VirtualTypeBuilder::InitializeFromType Method (ITypeResolutionService^, CodeNamespace^)

 

Initializes this virtual type builder with data obtained from the given type.

Namespace:   Microsoft.VisualStudio.Shell.Design
Assembly:  Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)

public:
void InitializeFromType(
	ITypeResolutionService^ typeResolutionService,
	CodeNamespace^ ns
)

Parameters

typeResolutionService
Type: System.ComponentModel.Design::ITypeResolutionService^

The type resolution service to use when resolving types in the Code Document Object Model (CodeDOM) tree.

ns
Type: System.CodeDom::CodeNamespace^

The namespace that contains a type to create. This namespace must contain exactly one type.

Exception Condition
ArgumentNullException

If any of the parameters are null.

ArgumentException

If ns contains anything other than a single type declaration.

The InitializeFromType method will clear all member collections and repopulate them based on a type declaration.

Return to top
Show: