This topic has not yet been rated - Rate this topic

TypeCodeDomSerializer.Deserialize Method

Deserializes the given type declaration.

Namespace:  System.ComponentModel.Design.Serialization
Assembly:  System.Design (in System.Design.dll)
public virtual Object Deserialize(
	IDesignerSerializationManager manager,
	CodeTypeDeclaration declaration
)

Parameters

manager
Type: System.ComponentModel.Design.Serialization.IDesignerSerializationManager
The serialization manager to use for serialization.
declaration
Type: System.CodeDom.CodeTypeDeclaration
Type declaration to use for serialization.

Return Value

Type: System.Object
A root Object.
Exception Condition
ArgumentNullException

manager or typeDecl is null.

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.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ