Επεξεργασία

Κοινή χρήση μέσω


CodeDomComponentSerializationService.DeserializeTo Method

Definition

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

public:
 override void DeserializeTo(System::ComponentModel::Design::Serialization::SerializationStore ^ store, System::ComponentModel::IContainer ^ container, bool validateRecycledTypes, bool applyDefaults);
public override void DeserializeTo (System.ComponentModel.Design.Serialization.SerializationStore store, System.ComponentModel.IContainer container, bool validateRecycledTypes, bool applyDefaults);
override this.DeserializeTo : System.ComponentModel.Design.Serialization.SerializationStore * System.ComponentModel.IContainer * bool * bool -> unit
Public Overrides Sub DeserializeTo (store As SerializationStore, container As IContainer, validateRecycledTypes As Boolean, applyDefaults As Boolean)

Parameters

store
SerializationStore

The SerializationStore from which the objects will be deserialized.

container
IContainer

A container of objects to which data will be applied.

validateRecycledTypes
Boolean

true to validate the recycled type; otherwise, false.

applyDefaults
Boolean

true to apply default property values; otherwise, false.

Exceptions

store or container is null.

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

Remarks

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.

Applies to