ComponentSerializationService::DeserializeTo Method (SerializationStore^, IContainer^)

 

Deserializes the given SerializationStore to the given container.

Namespace:   System.ComponentModel.Design.Serialization
Assembly:  System (in System.dll)

public:
void DeserializeTo(
	SerializationStore^ store,
	IContainer^ container
)

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.

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.

.NET Framework
Available since 2.0
Return to top
Show: