Редагувати

Поділитися через


ISerializationSurrogate.GetObjectData Method

Definition

Populates the provided SerializationInfo with the data needed to serialize the object.

public:
 void GetObjectData(System::Object ^ obj, System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context);
public void GetObjectData (object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
[System.Security.SecurityCritical]
public void GetObjectData (object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context);
abstract member GetObjectData : obj * System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
[<System.Security.SecurityCritical>]
abstract member GetObjectData : obj * System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext -> unit
Public Sub GetObjectData (obj As Object, info As SerializationInfo, context As StreamingContext)

Parameters

obj
Object

The object to serialize.

info
SerializationInfo

The SerializationInfo to populate with data.

context
StreamingContext

The destination (see StreamingContext) for this serialization.

Attributes

Exceptions

The caller does not have the required permission.

Remarks

Extracts data from object obj and stores it in the SerializationInfo info parameter.

Having located the surrogate, this method stores information on the object obj in the SerializationInfo info parameter. This information describes its view of that object, including the object's fields, properties, and current values. The SerializationInfo might correspond to the actual object, or it can be a synthesized view of the surrogate.

Applies to