IVisualizerObjectProvider2.Deserialize(Stream) 方法

定义

注意

This method uses binary serialization which is no longer supported, please use IVisualizerObjectProvider3.DeserializeFromJson or GetDeserializableObject methods instead.

旧版可视化工具使用的旧帮助程序方法使编写反序列化代码更容易。 它使用默认二进制序列化从流中读取给定对象。 但是,由于其用法存在安全漏洞,因此不应再使用它,并且会引发较新版本的 .NET(如 ASP.NET Core 5.0)。

如果在支持二进制序列化的目标应用上调用,在 方法完成流读取后,我们将返回基础对象。

public:
 System::Object ^ Deserialize(System::IO::Stream ^ stream);
public object Deserialize (System.IO.Stream stream);
[System.Obsolete("This method uses binary serialization which is no longer supported, please use IVisualizerObjectProvider3.DeserializeFromJson or GetDeserializableObject methods instead.")]
public object Deserialize (System.IO.Stream stream);
abstract member Deserialize : System.IO.Stream -> obj
[<System.Obsolete("This method uses binary serialization which is no longer supported, please use IVisualizerObjectProvider3.DeserializeFromJson or GetDeserializableObject methods instead.")>]
abstract member Deserialize : System.IO.Stream -> obj
Public Function Deserialize (stream As Stream) As Object

参数

stream
Stream

要从中读取对象的流

返回

以前序列化为流的对象

属性

例外

当目标应用不支持通过 BinaryFormatter 进行序列化时,将引发。

适用于