ISerializationSurrogate.SetObjectData(Object, SerializationInfo, StreamingContext, ISurrogateSelector) Metodo

Definizione

Popola l'oggetto utilizzando le informazioni presenti nell'oggetto SerializationInfo.Populates the object using the information in the SerializationInfo.

public:
 System::Object ^ SetObjectData(System::Object ^ obj, System::Runtime::Serialization::SerializationInfo ^ info, System::Runtime::Serialization::StreamingContext context, System::Runtime::Serialization::ISurrogateSelector ^ selector);
public object SetObjectData (object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector? selector);
public object SetObjectData (object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector);
[System.Security.SecurityCritical]
public object SetObjectData (object obj, System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context, System.Runtime.Serialization.ISurrogateSelector selector);
abstract member SetObjectData : obj * System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext * System.Runtime.Serialization.ISurrogateSelector -> obj
[<System.Security.SecurityCritical>]
abstract member SetObjectData : obj * System.Runtime.Serialization.SerializationInfo * System.Runtime.Serialization.StreamingContext * System.Runtime.Serialization.ISurrogateSelector -> obj
Public Function SetObjectData (obj As Object, info As SerializationInfo, context As StreamingContext, selector As ISurrogateSelector) As Object

Parametri

obj
Object

Oggetto da popolare.The object to populate.

info
SerializationInfo

Informazioni con cui popolare l'oggetto.The information to populate the object.

context
StreamingContext

Origine da cui viene deserializzato l'oggetto.The source from which the object is deserialized.

selector
ISurrogateSelector

Selettore di surrogati da cui viene avviata la ricerca di un surrogato compatibile.The surrogate selector where the search for a compatible surrogate begins.

Restituisce

Object

Oggetto deserializzato popolato.The populated deserialized object.

Attributi

Eccezioni

Il chiamante non dispone dell'autorizzazione richiesta.The caller does not have the required permission.

Commenti

Il SetObjectData metodo viene chiamato durante la deserializzazione.The SetObjectData method is called during deserialization. Con questo metodo, è possibile prendere il vuoto Object obj che è già stato creato e immettere i SerializationInfo info dati in tale oggetto.With this method, you can take the empty Objectobj that has already been created, and enter SerializationInfoinfo data into that object. I costruttori non vengono richiamati durante la deserializzazione delle informazioni e della ricostruzione dell'oggetto.Constructors are not invoked during deserialization of information and reconstruction of the object.

Questo metodo è protetto da un oggetto SecurityAction.LinkDemand per SecurityPermission con l' SecurityPermissionFlag.SerializationFormatter oggetto specificato.This method is protected by a SecurityAction.LinkDemand for the SecurityPermission with the SecurityPermissionFlag.SerializationFormatter specified.

Si applica a