RealProxy.GetObjectData(SerializationInfo, StreamingContext) Methode

Definition

Fügt der angegebenen RealProxy den transparenten Proxy hinzu, der durch die aktuelle Instanz von SerializationInfo dargestellt wird.

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.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.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)

Parameter

info
SerializationInfo

Die SerializationInfo, in die der transparente Proxy serialisiert wird.

context
StreamingContext

Die Quelle und das Ziel der Serialisierung.

Attribute

Ausnahmen

Der info-Parameter oder der context-Parameter ist null.

Der direkte Aufrufer verfügt nicht über die SerializationFormatter-Berechtigung.

Beispiele

[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 );
}
public override void GetObjectData( SerializationInfo info,
                                    StreamingContext context)
{
   // Add your custom data if any here.
   base.GetObjectData(info, context);
}
Public Overrides Sub GetObjectData(info As SerializationInfo, context As StreamingContext)
   ' Add your custom data if any here.
   MyBase.GetObjectData(info, context)
End Sub

Gilt für: