Udostępnij za pośrednictwem


Dictionary<TKey,TValue>.GetObjectData Metoda

Definicja

Przestroga

This API supports obsolete formatter-based serialization. It should not be called or extended by application code.

Implementuje ISerializable interfejs i zwraca dane potrzebne do serializacji Dictionary<TKey,TValue> wystąpienia.

public:
 virtual void GetObjectData(System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
public virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")]
public virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Security.SecurityCritical]
public virtual void GetObjectData (System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
abstract member GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
[<System.Obsolete("This API supports obsolete formatter-based serialization. It should not be called or extended by application code.", DiagnosticId="SYSLIB0051", UrlFormat="https://aka.ms/dotnet-warnings/{0}")>]
abstract member GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
[<System.Security.SecurityCritical>]
abstract member GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
override this.GetObjectData : System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
Public Overridable Sub GetObjectData (info As SerializationInfo, context As StreamingContext)

Parametry

info
SerializationInfo

SerializationInfo Obiekt zawierający informacje wymagane do serializacji Dictionary<TKey,TValue> wystąpienia.

context
StreamingContext

StreamingContext Struktura zawierająca źródło i miejsce docelowe serializowanego strumienia skojarzonego z wystąpieniemDictionary<TKey,TValue>.

Implementuje

Atrybuty

Wyjątki

info to null.

Uwagi

Ta metoda jest operacją O(n), gdzie n to Count.

Dotyczy

Zobacz też