Share via


IVisualizerObjectProvider2.Deserialize(Stream) Method

Definition

Caution

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

Legacy helper method used by old visualizers that makes it easier to write deserialization code. It uses default binary serialization to read the given object from the stream. However, due to security vulnerabilities with its usage, it should no longer be used, and will throw on newer versions of .NET like ASP.NET Core 5.0.

If called on a target app that supports Binary Serialization, after the method finishes the stream is read and we return the underlying object.

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

Parameters

stream
Stream

The stream from which to read the object

Returns

An object which was previously serialized into the stream

Attributes

Exceptions

Will throw when the target app does not support serialization through BinaryFormatter.

Applies to