VirtualTypeBuilder.InitializeFromType Method (ITypeResolutionService, CodeTypeDeclaration)
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)
Syntax
'宣言
Public Sub InitializeFromType ( _
typeResolutionService As ITypeResolutionService, _
typeDecl As CodeTypeDeclaration _
)
'使用
Dim instance As VirtualTypeBuilder
Dim typeResolutionService As ITypeResolutionService
Dim typeDecl As CodeTypeDeclaration
instance.InitializeFromType(typeResolutionService, _
typeDecl)
public void InitializeFromType(
ITypeResolutionService typeResolutionService,
CodeTypeDeclaration typeDecl
)
public:
void InitializeFromType(
ITypeResolutionService^ typeResolutionService,
CodeTypeDeclaration^ typeDecl
)
public function InitializeFromType(
typeResolutionService : ITypeResolutionService,
typeDecl : CodeTypeDeclaration
)
Parameters
typeResolutionService
Type: System.ComponentModel.Design.ITypeResolutionServiceThe type resolution service to use when resolving types in the Code Document Object Model (CodeDOM) tree.
typeDecl
Type: System.CodeDom.CodeTypeDeclarationUsed to initialize a type based on a type declaration.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | If any of the parameters are a null reference (Nothing in Visual Basic). |
Remarks
The InitializeFromType method will clear all member collections and repopulate them based on a type declaration.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.