แก้ไข

แชร์ผ่าน


CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager) Method

Definition

Parses code from a CodeDOM provider.

protected:
 override void PerformLoad(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager);
protected override void PerformLoad (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager);
override this.PerformLoad : System.ComponentModel.Design.Serialization.IDesignerSerializationManager -> unit
Protected Overrides Sub PerformLoad (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 PerformLoad method obtains an ICodeParser from the CodeDOM provider and parses the code. PerformLoad locates the first class in the file, obtains a root CodeDomSerializer for the data type, and then invokes the serializer to deserialize the data type. PerformLoad assumes that this process will create all necessary components in the IContainer of the LoaderHost property. Finally, PerformLoad calls the SetBaseComponentClassName method with the fully qualified name of the type it passed to the CodeDOM serializer.

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 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.

Applies to

See also