System.Design 2.0.0.0 System.ComponentModel.Design.Serialization.BasicDesignerLoader System.ComponentModel.Design.Serialization.IDesignerSerializationService System.ComponentModel.Design.Serialization.INameCreationService

is an abstract class that provides a full designer loader based on the Code Document Object Model (CodeDOM). You provide the CodeDOM parser and generator, and a type resolution service.

Provides the base class for implementing a CodeDOM-based designer loader.

- Constructor
  2.0.0.0
  To be added.

  Initializes a new instance of the class.

- Property
  2.0.0.0
  System.CodeDom.Compiler.CodeDomProvider To be added.

  The designer loader does not parse or generate code from the returned , but it does use the provider to obtain an that it can use to validate identifiers in the name-creation service. The designer loader will also check the to see if it implements the interface. For more information on parsing or generating code, see the and methods.

  Gets the this designer loader will use.

- Method
  2.0.0.0
  System.Void

  The method removes services added by the method.

  Call when you are finished using the . The method leaves the in an unusable state. After calling , you must release all references to the so the garbage collector can reclaim the memory that the was occupying. For more information, see Cleaning Up Unmanaged Resources and Implementing a Dispose Method.

  Always call before you release your last reference to the . Otherwise, the resources it is using will not be freed until the garbage collector calls the object's Finalize method.

  Releases the resources used by the class.

- Method
  2.0.0.0
  System.Void

  The following table describes the replaceable services that the adds to the service container.

  Term

  Definition

  Provides semantics for creating names of objects. The service uses the CodeDOM provider’s interface to create names that are valid identifiers for the language. In addition, the name creation service supports empty names. Empty names should be interpreted as temporary local variables during serialization.

  Allows other objects to serialize a group of components into a binary object. This service is most often used by features such as copy and paste or undo and redo. The class provides a designer serialization service that is based on creating CodeDOM trees for objects.

  This service replaces as a means to serialize components to a binary object.

  For details on replaceable and non-replaceable services, see .

  Initializes services.

- Method
  2.0.0.0
  System.Boolean

  The method checks for the presence of the interface on the . The provider will reparse the CodeDOM tree and pass the resulting parse tree to the method. If this method returns false, the designer will not be reloaded.

  Returns a value indicating whether a reload is required.

  true if the decides a reload is required; otherwise, false.

- Method
  2.0.0.0
  System.Void

  For more information on the method, see .

  Notifies the designer loader that loading is about to begin.

- Method
  2.0.0.0
  System.Void

  For more information on the method, see .

  Notifies the designer loader that unloading is about to begin.

- Method
  2.0.0.0
  System.Void `` `` `` To be added.

  Raises the event.

  The component to rename. The original name of the component. The new name of the component.
- Method
  2.0.0.0
  System.Void `` ``

  For more information on the method, see .

  Notifies the designer loader that loading is complete.

  true to indicate that the load completed successfully; otherwise, false. An of objects (usually exceptions) that were reported as errors.
- Method
  2.0.0.0
  System.CodeDom.CodeCompileUnit

  The method is called when the needs to parse the source code. The source code location and format must be specified by deriving classes.

  Parses the text or other persistent storage and returns a .

  A resulting from a parse operation.

- Method
  2.0.0.0
  System.Void ``

  The method obtains the root for the root component of the designer and invokes the serializer to serialize the component. If the result of this operation is a , then integrates the with the existing CodeDOM tree. The result is the original CodeDOM tree with matching members and statements replaced. Finally, calls the abstract method to save this CodeDOM tree.

  If the serialization of the root designer component does not result in a , then does nothing further.

  It is the responsibility of the caller to ensure that a CodeDOM originates from a trusted source. Accepting a CodeDOM object from an untrusted party could allow that party to run malicious code. When flushing a CodeDOM into a file, the framework will run code represented by the CodeDOM object and the serialized content of the object as provided.

  Requests serialization of the root component of the designer.

  The from which to request the serializer.
- Method
  2.0.0.0
  System.Void ``

  The method obtains an from the CodeDOM provider and parses the code. locates the first class in the file, obtains a root for the data type, and then invokes the serializer to deserialize the data type. assumes that this process will create all necessary components in the of the property. Finally, calls the method with the fully qualified name of the type it passed to the CodeDOM serializer.

  It is the responsibility of the caller to ensure that a CodeDOM originates from a trusted source. Accepting a CodeDOM object from an untrusted party could allow that party to run malicious code. When loading a CodeDOM into the design surface, the framework will run code represented by the CodeDOM object and the serialized content of the object as provided.

  Parses code from a CodeDOM provider.

  The from which to request the serializer.
- Method
  2.0.0.0
  System.Collections.ICollection `` To be added.

  Deserializes the specified serialization data object and returns a collection of objects represented by that data.

  A collection of objects represented by .

  An object consisting of serialized data.
- Method
  2.0.0.0
  System.Object `` To be added.

  Serializes the specified collection of objects and stores them in a serialization data object.

  An object that contains the serialized state of the specified collection of objects.

  A collection of objects to serialize.
- Method
  2.0.0.0
  System.String `` `` To be added.

  Creates a new name that is unique to all components in the specified container.

  A unique name for the data type.

  The container where the new object is added. The data type of the object that receives the name.
- Method
  2.0.0.0
  System.Boolean `` To be added.

  Gets a value indicating whether the specified name is valid.

  true if the name is valid; otherwise, false.

  The name to validate.
- Method
  2.0.0.0
  System.Void `` To be added.

  Gets a value indicating whether the specified name is valid.

  The name to validate.
- Property
  2.0.0.0
  System.ComponentModel.Design.ITypeResolutionService To be added.

  The automatically adds this to the service container when the method is invoked. While the type resolution service is optional in many scenarios, it is required for code interpretation because source code contains type names, but no assembly references.

  Gets the type resolution service to be used with this designer loader.

- Method
  2.0.0.0
  System.Void ``

  The method saves a to persistent storage. The deriving class is responsible for invoking the on the appropriate text writer to save the code. The ensures that the CodeDOM objects that are passed to are the same instances of objects that were retrieved from , except in cases where the serialization process had to make changes to the code. This allows an optimized designer loader to store additional data in the property of code elements. This data will be available during the method for any elements that were not replaced by the serialization process.

  Writes compile-unit changes to persistent storage.

  The to be persisted.