Επεξεργασία

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


CodeDomDesignerLoader.Write(CodeCompileUnit) Method

Definition

Writes compile-unit changes to persistent storage.

protected:
 abstract void Write(System::CodeDom::CodeCompileUnit ^ unit);
protected abstract void Write (System.CodeDom.CodeCompileUnit unit);
abstract member Write : System.CodeDom.CodeCompileUnit -> unit
Protected MustOverride Sub Write (unit As CodeCompileUnit)

Parameters

unit
CodeCompileUnit

The CodeCompileUnit to be persisted.

Remarks

The Write method saves a CodeCompileUnit to persistent storage. The deriving class is responsible for invoking the ICodeGenerator on the appropriate text writer to save the code. The CodeDomDesignerLoader ensures that the CodeDOM objects that are passed to Write are the same instances of objects that were retrieved from Parse, 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 UserData property of code elements. This data will be available during the Write method for any elements that were not replaced by the serialization process.

Applies to

See also