BinaryFormatter Klasa
Definicja
Ważne
Niektóre informacje odnoszą się do produktu w wersji wstępnej, który może zostać znacząco zmodyfikowany przed wydaniem. Firma Microsoft nie udziela żadnych gwarancji, jawnych lub domniemanych, w odniesieniu do informacji podanych w tym miejscu.
Przestroga
BinaryFormatter serialization is obsolete and should not be used. See https://aka.ms/binaryformatter for more information.
Serializuje i deserializuje obiekt lub cały graf połączonych obiektów w formacie binarnym.
public ref class BinaryFormatter sealed : System::Runtime::Serialization::IFormatter
public ref class BinaryFormatter sealed : System::Runtime::Remoting::Messaging::IRemotingFormatter
public sealed class BinaryFormatter : System.Runtime.Serialization.IFormatter
[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 sealed class BinaryFormatter : System.Runtime.Serialization.IFormatter
public sealed class BinaryFormatter : System.Runtime.Remoting.Messaging.IRemotingFormatter
[System.Runtime.InteropServices.ComVisible(true)]
public sealed class BinaryFormatter : System.Runtime.Remoting.Messaging.IRemotingFormatter
type BinaryFormatter = class
interface IFormatter
[<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}")>]
type BinaryFormatter = class
interface IFormatter
type BinaryFormatter = class
interface IRemotingFormatter
interface IFormatter
[<System.Runtime.InteropServices.ComVisible(true)>]
type BinaryFormatter = class
interface IRemotingFormatter
interface IFormatter
Public NotInheritable Class BinaryFormatter
Implements IFormatter
Public NotInheritable Class BinaryFormatter
Implements IRemotingFormatter
- Dziedziczenie
-
BinaryFormatter
- Atrybuty
- Implementuje
Uwagi
Ostrzeżenie: BinaryFormatter jest niezabezpieczony i nie można go zabezpieczyć. Aby uzyskać więcej informacji, zobacz BinaryFormatter security guide and System.Runtime.Serialization.Formatters.Binary.BinaryFormatter class (Przewodnik zabezpieczeń BinaryFormatter) i System.Runtime.Serialization.Formatters.BinaryFormatter, klasa.
Konstruktory
| BinaryFormatter() |
Przestarzałe.
Inicjuje nowe wystąpienie klasy BinaryFormatter z domyślnymi wartościami. |
| BinaryFormatter(ISurrogateSelector, StreamingContext) |
Przestarzałe.
Inicjuje BinaryFormatter nowe wystąpienie klasy z danym selektorem zastępczym i kontekstem przesyłania strumieniowego. |
Właściwości
| AssemblyFormat |
Przestarzałe.
Pobiera lub ustawia zachowanie deserializatora w odniesieniu do znajdowania i ładowania zestawów. |
| Binder |
Przestarzałe.
(Niezabezpieczone) Pobiera lub ustawia obiekt typu SerializationBinder , który kontroluje powiązanie obiektu serializowanego na typ. |
| Context |
Przestarzałe.
Pobiera lub ustawia StreamingContext dla tego formatnika. |
| FilterLevel |
Przestarzałe.
Pobiera lub ustawia automatyczną TypeFilterLevel deserializacji BinaryFormatter wykonywane. |
| SurrogateSelector |
Przestarzałe.
Pobiera lub ustawia element ISurrogateSelector , który kontroluje zastępowanie typów podczas serializacji i deserializacji. |
| TypeFormat |
Przestarzałe.
Pobiera lub ustawia format, w którym opisy typów są określone w strumieniu serializowanym. |
Metody
| Deserialize(Stream) |
Przestarzałe.
Deserializuje określony strumień do grafu obiektu. |
| Deserialize(Stream, HeaderHandler) |
Przestarzałe.
Deserializuje określony strumień do grafu obiektu. Podana usługa HeaderHandler obsługuje wszystkie nagłówki w tym strumieniu. |
| DeserializeMethodResponse(Stream, HeaderHandler, IMethodCallMessage) |
Przestarzałe.
Deserializuje odpowiedź na zdalne wywołanie metody z podanego Streamelementu . |
| Equals(Object) |
Przestarzałe.
Określa, czy dany obiekt jest taki sam, jak bieżący obiekt. (Odziedziczone po Object) |
| GetHashCode() |
Przestarzałe.
Służy jako domyślna funkcja skrótu. (Odziedziczone po Object) |
| GetType() |
Przestarzałe.
Type Pobiera bieżące wystąpienie. (Odziedziczone po Object) |
| MemberwiseClone() |
Przestarzałe.
Tworzy płytkią kopię bieżącego Objectelementu . (Odziedziczone po Object) |
| Serialize(Stream, Object) |
Przestarzałe.
Serializuje obiekt lub graf obiektów z określonym górnym (głównym) do danego strumienia. |
| Serialize(Stream, Object, Header[]) |
Przestarzałe.
Serializuje obiekt lub graf obiektów z określonym górnym (głównym) do danego strumienia dołączającego podane nagłówki. |
| ToString() |
Przestarzałe.
Zwraca ciąg reprezentujący bieżący obiekt. (Odziedziczone po Object) |
| UnsafeDeserialize(Stream, HeaderHandler) |
Przestarzałe.
Deserializuje określony strumień do grafu obiektu. Podana usługa HeaderHandler obsługuje wszystkie nagłówki w tym strumieniu. |
| UnsafeDeserializeMethodResponse(Stream, HeaderHandler, IMethodCallMessage) |
Przestarzałe.
Deserializuje odpowiedź na zdalne wywołanie metody z podanego Streamelementu . |