Bewerken

Delen via


CodeDomDesignerLoader.PerformFlush(IDesignerSerializationManager) Method

Definition

Requests serialization of the root component of the designer.

protected:
 override void PerformFlush(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager);
protected override void PerformFlush (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager);
override this.PerformFlush : System.ComponentModel.Design.Serialization.IDesignerSerializationManager -> unit
Protected Overrides Sub PerformFlush (manager As IDesignerSerializationManager)

Parameters

manager
IDesignerSerializationManager

The IDesignerSerializationManager from which to request the serializer.

Exceptions

The language did not provide a code parser for this file; this file type may not support a designer.

The class can be designed, but it is not the first class in the file, or the designer could not be shown for this file because none of the classes within it can be designed.

Remarks

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

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

Important

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.

Applies to