Retrieves a type definition given a type name and data source guid.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'宣言
Public Overridable Function GetType ( _
dataSource As Guid, _
typeName As String _
) As Type
'使用
Dim instance As DataSourceSpecializer
Dim dataSource As Guid
Dim typeName As String
Dim returnValue As Type
returnValue = instance.GetType(dataSource, _
typeName)
public virtual Type GetType(
Guid dataSource,
string typeName
)
public:
virtual Type^ GetType(
Guid dataSource,
String^ typeName
)
public function GetType(
dataSource : Guid,
typeName : String
) : Type
Parameters
dataSource
Type: System.GuidDDEX data source guid.
typeName
Type: System.StringName of the assembly to retrieve.
Return Value
Type: System.Type
Returns a type definition.
Remarks
This method allows DDEX providers to customize resolution of types referenced from dynamic locations such as XML files. The base class implementation tries to locate a comma separating the type name from its qualifying assembly, and if found, calls the GetAssembly method with the assembly qualifier and, if found, tries to retrieve the type from this assembly. Otherwise it calls GetAssembly with an empty string and, if found, tries to get the type from this assembly. Finally if the type is still not found, it calls the standard GetType method and returns the result of this call.
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.