System 2.0.0.0 4.0.0.0 System.Object

The serializes a set of components or serializable objects into a serialization store. The store can then be deserialized later. The class differs from other serialization schemes in that the serialization format is opaque, and it allows for partial serialization of objects. For example, you can choose to serialize only selected properties for an object.

This class is abstract. Typically, a will provide a concrete implementation of this class and add it as a service to its . This allows objects to be serialized in the format best suited for them.

The class replaces the interface from the .NET Framework version 1.0, although the latter is retained for backward compatibility.

Provides the base class for serializing a set of components or serializable objects into a serialization store.

- Constructor
  2.0.0.0
  4.0.0.0
  To be added.

  Initializes a new instance of the class.

- Method
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Design.Serialization.SerializationStore

  Multiple objects can be serialized into the same serialization store. When you are finished with the store, you can call its or method. Once closed, a serialization store can be used for deserialization, or it can be saved into a stream.

  The serialization store can be passed to any of the various serializing methods to build up serialization state for a group of objects.

  Creates a new .

  A new created serialization store.

- Method
  2.0.0.0
  4.0.0.0
  System.Collections.ICollection ``

  This method deserializes to produce a collection of objects contained within it. Objects are deserialized in the same order in which they were serialized.

  Deserializes the given store to produce a collection of objects.

  A collection of objects created according to the stored state.

  The to deserialize.
- Method
  2.0.0.0
  4.0.0.0
  System.Collections.ICollection `` ``

  This method deserializes to produce a collection of objects contained within it. Objects are deserialized in the same order in which they were serialized.

  Created objects that implement are added to .

  Deserializes the given store and populates the given with deserialized objects.

  A collection of objects created according to the stored state.

  The to deserialize. The to which objects will be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The method deserializes , 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 , it will be added to . 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.

  Deserializes the given to the given container.

  The to deserialize. The container to which objects will be added.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  The method deserializes , 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 , it will be added to . 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.

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

  The to deserialize. The container to which objects will be added. true to guarantee that the deserialization will only work if applied to an object of the same type.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` `` ``

  The method deserializes , 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 , it will be added to . 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.

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

  The to deserialize. The container to which objects will be added. true to guarantee that the deserialization will only work if applied to an object of the same type. true to indicate that the default property values should be applied.
- Method
  2.0.0.0
  4.0.0.0
  System.ComponentModel.Design.Serialization.SerializationStore ``

  You can use the returned store to deserialize objects by passing it to one of the methods.

  Loads a from a stream.

  A new instance.

  The from which the store will be loaded.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  The store can be used to serialize more than one object by calling this method more than once.

  Serializes the given object to the given .

  The to which the state of will be written. The object to serialize.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` ``

  Standard serialization, as implemented through the method, only serializes values that differ from the component's default state. This provides the most compact serialization mechanism but assumes that a newly created object will be used during deserialization. If an existing object is used, the resulting deserialized object is not guaranteed to duplicate the original state of the serialized object; the properties that contained default values during serialization will not be reset back to their defaults during deserialization.

  The method does not use this shortcut. It serializes all properties of the source object so that deserialization can restore all the object's properties, regardless of default state.

  This method is particularly useful for serializing collections, because the order of the constituent items within the collection can change. In this circumstance, the safest process to restore the original state of the entire collection is to overwrite all the items with all their original property values.

  Serializes the given object, accounting for default property values.

  The to which the state of will be serialized. The object to serialize.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  The method can be invoked multiple times for the same object to build up a list of serialized members within the serialization store. In general, the member should be a property or an event.

  Serializes the given member on the given object.

  The to which the state of will be serialized. The object to which is attached. A specifying the member to serialize.
- Method
  2.0.0.0
  4.0.0.0
  System.Void `` `` ``

  The method serializes the on , even if contains the default property value.

  Note that for some members, containing the default value and restoring the setting of the same value to the member are different concepts. For example, if a property inherits its value from a parent object when no local value is set, setting the value back to the property may not be what is desired. The method takes this into account and would clear the state of the property in this case.

  Serializes the given member on the given object, accounting for the default property value.

  The to which the state of will be serialized. The object to which is attached. The member to serialize.