Partager via


RealProxy.GetObjectData(SerializationInfo, StreamingContext) Méthode

Définition

Ajoute au RealProxy spécifié le proxy transparent de l'objet représenté par l'instance actuelle de SerializationInfo.

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)

Paramètres

info
SerializationInfo

SerializationInfo dans lequel le proxy transparent est sérialisé.

context
StreamingContext

Source et destination de la sérialisation.

Attributs

Exceptions

Le paramètre info ou context est null.

L'appelant immédiat n'a pas d'autorisation SerializationFormatter (formateur de sérialisation).

Exemples

[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

S’applique à