ComponentSerializationService::DeserializeTo Method (SerializationStore^, IContainer^, Boolean, Boolean)
Deserializes the given SerializationStore to the given container, optionally applying default property values.
Assembly: System (in System.dll)
public: virtual void DeserializeTo( SerializationStore^ store, IContainer^ container, bool validateRecycledTypes, bool applyDefaults ) abstract
Parameters
- store
-
Type:
System.ComponentModel.Design.Serialization::SerializationStore^
The SerializationStore to deserialize.
- container
-
Type:
System.ComponentModel::IContainer^
The container to which IComponent objects will be added.
- validateRecycledTypes
-
Type:
System::Boolean
true to guarantee that the deserialization will only work if applied to an object of the same type.
- applyDefaults
-
Type:
System::Boolean
true to indicate that the default property values should be applied.
| Exception | Condition |
|---|---|
| ArgumentNullException | store or container is null. |
| InvalidOperationException | store does not contain data in a format the serialization container can process. |
The DeserializeTo method deserializes store, but instead of producing new objects, it applies the data in the store to an existing set of objects that are taken from the provided container. As a result, the caller can create in advance an object however it sees fit. If an object has a deserialization state and the object is not named in the set of existing objects, a new object will be created. If that object also implements IComponent, it will be added to container. Objects in the container must have names and types that match objects in the serialization store in order for an existing object to be used.
Available since 2.0