ISerializationSurrogate.SetObjectData Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
- obj
- Object
The object to populate.
- info
- SerializationInfo
The information to populate the object.
- context
- StreamingContext
The source from which the object is deserialized.
- selector
- ISurrogateSelector
The surrogate selector where the search for a compatible surrogate begins.
The populated deserialized object.
- Attributes
The caller does not have the required permission.
The SetObjectData method is called during deserialization. With this method, you can take the empty Object obj
that has already been created, and enter SerializationInfo info
data into that object. Constructors are not invoked during deserialization of information and reconstruction of the object.
Product | Versions |
---|---|
.NET | Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 |
.NET Framework | 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET Standard | 2.0, 2.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: