ComponentSerializationService.DeserializeTo Method

Definition

Deserializes the given SerializationStore to the given container.

Overloads

DeserializeTo(SerializationStore, IContainer)

Deserializes the given SerializationStore to the given container.

DeserializeTo(SerializationStore, IContainer, Boolean)

Deserializes the given SerializationStore to the given container, optionally validating recycled types.

DeserializeTo(SerializationStore, IContainer, Boolean, Boolean)

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

DeserializeTo(SerializationStore, IContainer)

Source:
ComponentSerializationService.cs
Source:
ComponentSerializationService.cs
Source:
ComponentSerializationService.cs

Deserializes the given SerializationStore to the given container.

C#
public void DeserializeTo(System.ComponentModel.Design.Serialization.SerializationStore store, System.ComponentModel.IContainer container);

Parameters

store
SerializationStore

The SerializationStore to deserialize.

container
IContainer

The container to which IComponent objects will be added.

Exceptions

store or container is null.

store does not contain data in a format the serialization container can process.

Remarks

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.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

DeserializeTo(SerializationStore, IContainer, Boolean)

Source:
ComponentSerializationService.cs
Source:
ComponentSerializationService.cs
Source:
ComponentSerializationService.cs

Deserializes the given SerializationStore to the given container, optionally validating recycled types.

C#
public void DeserializeTo(System.ComponentModel.Design.Serialization.SerializationStore store, System.ComponentModel.IContainer container, bool validateRecycledTypes);

Parameters

store
SerializationStore

The SerializationStore to deserialize.

container
IContainer

The container to which IComponent objects will be added.

validateRecycledTypes
Boolean

true to guarantee that the deserialization will only work if applied to an object of the same type.

Exceptions

store or container is null.

store does not contain data in a format the serialization container can process.

Remarks

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.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1

DeserializeTo(SerializationStore, IContainer, Boolean, Boolean)

Source:
ComponentSerializationService.cs
Source:
ComponentSerializationService.cs
Source:
ComponentSerializationService.cs

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

C#
public abstract void DeserializeTo(System.ComponentModel.Design.Serialization.SerializationStore store, System.ComponentModel.IContainer container, bool validateRecycledTypes, bool applyDefaults);

Parameters

store
SerializationStore

The SerializationStore to deserialize.

container
IContainer

The container to which IComponent objects will be added.

validateRecycledTypes
Boolean

true to guarantee that the deserialization will only work if applied to an object of the same type.

applyDefaults
Boolean

true to indicate that the default property values should be applied.

Exceptions

store or container is null.

store does not contain data in a format the serialization container can process.

Remarks

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.

See also

Applies to

.NET 10 and other versions
Product Versions
.NET Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 2.0, 2.1