RealProxy::GetObjectData Method (SerializationInfo^, StreamingContext)

 

Adds the transparent proxy of the object represented by the current instance of RealProxy to the specified SerializationInfo.

Namespace:   System.Runtime.Remoting.Proxies
Assembly:  mscorlib (in mscorlib.dll)

public:
[SecurityCriticalAttribute]
virtual void GetObjectData(
	SerializationInfo^ info,
	StreamingContext context
)

Parameters

info
Type: System.Runtime.Serialization::SerializationInfo^

The SerializationInfo into which the transparent proxy is serialized.

context
Type: System.Runtime.Serialization::StreamingContext

The source and destination of the serialization.

Exception Condition
ArgumentNullException

The info or context parameter is null.

SecurityException

The immediate caller does not have SerializationFormatter permission.

[System::Security::Permissions::SecurityPermissionAttribute(
System::Security::Permissions::SecurityAction::LinkDemand,
Flags=System::Security::Permissions::SecurityPermissionFlag::Infrastructure)]
virtual void GetObjectData( SerializationInfo^ info, StreamingContext context ) override
{
   // Add your custom data if any here.
   RealProxy::GetObjectData( info, context );
}

SecurityPermission

For providing serialization services. Demand value: SecurityAction::LinkDemand; Permission value: SecurityPermissionFlag::SerializationFormatter

.NET Framework
Available since 1.1
Return to top
Show: