System.Design 2.0.0.0 System.ComponentModel.Design.Serialization.CodeDomSerializerBase

You can implement a custom to control the generation of component initialization code for a type of component at design time.

To implement a custom for a type, you must:

Define a class that derives from .

Implement method overrides for serialization or deserialization methods. (See the information below for details.)

Associate your custom implementation with a type of component using a .

To implement a serialization method for generating configuration code for a component:

Within a class that derives from , override an appropriate serialization or deserialization method of the base class.

If you want the default serializer to generate code statements that perform the default component configuration, you must obtain and call the base serializer for the component. To obtain the base serializer for the component, call the method of the passed to your method override. Pass the method the type of the component to serialize the configuration of, along with the base type of serializer you are requesting, which is . Call the method of the same name you are overriding on the base serializer, using the and object passed to your method override. If you are implementing the method, the method of the base serializer will return an object. The type of this object depends on the type of base serializer which depends on the type of component you are serializing the values of. If you are implementing the , , or method, you must create a new to contain the generated code statements, and pass it to the method.

If you have called a base serializer method, you will have a that contains the statements to generate to initialize the component. Otherwise you should create a . You can add objects representing statements to generate in the component configuration code to this collection.

Return the that represents the source code to generate to configure the component.

Serializes an object graph to a series of CodeDOM statements. This class provides an abstract base class for a serializer.

- Constructor
  To be added.

  Initializes a new instance of the class.

  2.0.0.0
- Method
  System.Object `` ``

  This method uses the serialization manager to create objects and resolve data types. The root of the object graph is returned.

  Deserializes the specified serialized CodeDOM object into an object.

  The deserialized CodeDOM object.

  A serialization manager interface that is used during the deserialization process. A serialized CodeDOM object to deserialize. 2.0.0.0
- Method
  2.0.0.0
  System.Object `` ``

  The is equivalent of calling , except that it returns an object instance if the resulting statement was a variable assign statement, a variable declaration with an init expression, or a field assignment statement.

  Deserializes a single statement.

  An object instance resulting from deserializing .

  The serialization manager to use for serialization. The statement to deserialize.
- Method
  2.0.0.0
  System.String `` `` `` To be added.

  Determines which statement group the given statement should belong to.

  The name of the component with which should be grouped.

  The for which to determine the group. A that has been reduced to. The of .
- Method
  System.Object `` `` To be added.

  Serializes the specified object into a CodeDOM object.

  A CodeDOM object representing the object that has been serialized.

  The serialization manager to use during serialization. The object to serialize. 2.0.0.0
- Method
  2.0.0.0
  System.Object `` `` To be added.

  Serializes the given object, accounting for default values.

  A CodeDom object representing .

  The serialization manager to use for serialization. The object to serialize.
- Method
  2.0.0.0
  System.CodeDom.CodeStatementCollection `` `` `` To be added. To be added.

  Serializes the given member on the given object.

  A representing the serialized state of .

  The serialization manager to use for serialization. The member to serialize.
- Method
  2.0.0.0
  System.CodeDom.CodeStatementCollection `` `` `` To be added. To be added.

  Serializes the given member, accounting for default values.

  A CodeDom object representing .

  The serialization manager to use for serialization. The member to serialize.
- Method
  System.CodeDom.CodeExpression `` ``

  This method is similar to , except that it stops if it cannot obtain a simple reference expression for the value. Call this method when you expect the resulting expression to be used as a parameter or target of a statement.

  Serializes the specified value to a CodeDOM expression.

  The serialized value. This returns null if no reference expression can be obtained for the specified value, or the value cannot be serialized.

  The serialization manager to use during serialization. The object to serialize. 2.0.0.0 System.Obsolete("This method has been deprecated. Use SerializeToExpression or GetExpression instead.")