CodeDomComponentSerializationService::DeserializeTo Method (SerializationStore^, IContainer^, Boolean, Boolean)

 

Deserializes the given SerializationStore to the given container, optionally applying default property values.

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

public:
virtual void DeserializeTo(
	SerializationStore^ store,
	IContainer^ container,
	bool validateRecycledTypes,
	bool applyDefaults
) override

Parameters

store
Type: System.ComponentModel.Design.Serialization::SerializationStore^

The SerializationStore from which the objects will be deserialized.

container
Type: System.ComponentModel::IContainer^

A container of objects to which data will be applied.

validateRecycledTypes
Type: System::Boolean

true to validate the recycled type; otherwise, false.

applyDefaults
Type: System::Boolean

true to apply default property values; otherwise, false.

Exception Condition
ArgumentNullException

store or container is null.

InvalidOperationException

store is not a supported type of serialization store. Use a store returned by CreateStore.

The DeserializeTo method deserializes the given store, but rather than producing new objects, the data in the store is applied to an existing set of objects that are taken from the container parameter. As a result, the caller can create in advance an object however it sees fit. If an object has 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 the given 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: