ISerializationSurrogate.GetObjectData Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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.