ComponentSerializationService::DeserializeTo Method (SerializationStore^, IContainer^, Boolean)
Deserializes the given SerializationStore to the given container, optionally validating recycled types.
Assembly: System (in System.dll)
public: void DeserializeTo( SerializationStore^ store, IContainer^ container, bool validateRecycledTypes )
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.
| 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