IFormatter.Deserialize(Stream) Metod

Definition

Varning

BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.

Deserialiserar data på den angivna strömmen och återskapar grafen över objekt.

public:
 System::Object ^ Deserialize(System::IO::Stream ^ serializationStream);
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("BinaryFormatter serialization uses dynamic code generation, the type of objects being processed cannot be statically discovered.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")]
public object Deserialize(System.IO.Stream serializationStream);
[System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public object Deserialize(System.IO.Stream serializationStream);
[System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the Type of objects being processed cannot be statically discovered.")]
public object Deserialize(System.IO.Stream serializationStream);
public object Deserialize(System.IO.Stream serializationStream);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("BinaryFormatter serialization uses dynamic code generation, the type of objects being processed cannot be statically discovered.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the type of objects being processed cannot be statically discovered.")>]
abstract member Deserialize : System.IO.Stream -> obj
[<System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member Deserialize : System.IO.Stream -> obj
[<System.Obsolete("BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.", DiagnosticId="SYSLIB0011", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("BinaryFormatter serialization is not trim compatible because the Type of objects being processed cannot be statically discovered.")>]
abstract member Deserialize : System.IO.Stream -> obj
abstract member Deserialize : System.IO.Stream -> obj
Public Function Deserialize (serializationStream As Stream) As Object

Parametrar

serializationStream
Stream

Dataströmmen som innehåller de data som ska deserialiseras.

Returer

Det översta objektet i den deserialiserade grafen.

Attribut

Kommentarer

Metoden Deserialize läser grafinformation från strömmen och rekonstruerar en klon av den ursprungliga grafen. Grafens topologi bevaras.

Deserialiseringsprocessen allokerar ett tomt objekt av lämplig typ och fyller i fälten igen från data som överförs i dataströmmen serializationStream . Det är viktigt att observera att ingen konstruktor någonsin anropas på objektet under deserialiseringen.

Gäller för

Se även