แก้ไข

แชร์ผ่าน


TypeCodeDomSerializer.Deserialize Method

Definition

Deserializes the given type declaration.

public:
 virtual System::Object ^ Deserialize(System::ComponentModel::Design::Serialization::IDesignerSerializationManager ^ manager, System::CodeDom::CodeTypeDeclaration ^ declaration);
public virtual object Deserialize (System.ComponentModel.Design.Serialization.IDesignerSerializationManager manager, System.CodeDom.CodeTypeDeclaration declaration);
abstract member Deserialize : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * System.CodeDom.CodeTypeDeclaration -> obj
override this.Deserialize : System.ComponentModel.Design.Serialization.IDesignerSerializationManager * System.CodeDom.CodeTypeDeclaration -> obj
Public Overridable Function Deserialize (manager As IDesignerSerializationManager, declaration As CodeTypeDeclaration) As Object

Parameters

manager
IDesignerSerializationManager

The serialization manager to use for serialization.

declaration
CodeTypeDeclaration

Type declaration to use for serialization.

Returns

The root object.

Exceptions

manager or typeDecl is null.

Remarks

The Deserialize method deserializes a previously serialized code type declaration. The following table shows the tasks default implementation performs.

Task Description
Case Sensitivity Checks The implementation searches for a CodeDomProvider service to decide if it should treat members as case sensitive or case insensitive.
Statement Sorting All member variables and local variables from init methods are stored in a table. Then each statement in an init method is added to a statement collection grouped according to its left-hand side, so all statements assigning or operating on a particular variable are grouped under that variable. Variables that have no statements are discarded.
Deserialization The statement collections for each variable are deserialized according to the variable.

The following table shows the services the Deserialize method requires.

Service Description
CodeDomProvider While not strictly necessary, the service, if available, is used to determine if the serialization should be case sensitive or case insensitive.
IContainer If an object does not exist in the name table during deserialization, a query for IContainer is made. If this query succeeds, the container is checked for the object. The container is also used as a stand-in for any container argument needed by components.

Applies to

See also