System.Runtime.Serialization.ISerializationSurrogate.GetObjectData Method

Populates the provided System.Runtime.Serialization.SerializationInfo with the data needed to serialize the object.

Syntax

public void GetObjectData (object obj, SerializationInfo info, StreamingContext context)

Parameters

obj
The object to serialize.
info
The System.Runtime.Serialization.SerializationInfo to populate with data.
context
The destination (see System.Runtime.Serialization.StreamingContext) for this serialization.

Remarks

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

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

This method is protected by a System.Security.Permissions.SecurityAction.LinkDemand for the System.Security.Permissions.SecurityPermission with the System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter specified.

Requirements

Namespace: System.Runtime.Serialization
Assembly: mscorlib (in mscorlib.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0