Share via


IVsDataProvider.GetType 메서드 (Guid, String)

해당 하는 공급자별 형식 이름을 확인 Type DDEX 특정 데이터 소스에 대 한 표현입니다.

네임스페이스:  Microsoft.VisualStudio.Data.Core
어셈블리:  Microsoft.VisualStudio.Data.Core(Microsoft.VisualStudio.Data.Core.dll)

구문

‘선언
Function GetType ( _
    source As Guid, _
    typeName As String _
) As Type
Type GetType(
    Guid source,
    string typeName
)
Type^ GetType(
    Guid source, 
    String^ typeName
)
abstract GetType : 
        source:Guid * 
        typeName:string -> Type
function GetType(
    source : Guid, 
    typeName : String
) : Type

매개 변수

  • source
    형식: Guid

    DDEX 데이터 소스 식별자입니다.

  • typeName
    형식: String

    공급자별 형식 이름입니다.

반환 값

형식: Type
A Type ; 발견 되 면 지정한 DDEX 데이터 원본에 대해 지정 된 형식 이름에서 확인 되는 형식을 나타내는 개체 그렇지 않으면 nullNull 참조(Visual Basic의 경우 Nothing).

예외

예외 조건
ArgumentNullException

typeName 매개 변수가 nullNull 참조(Visual Basic의 경우 Nothing)입니다.

[<ANY>]

DDEX 공급자 GetType 또는 GetType 구현에서 예외가 발생 했습니다.

설명

여부 소스 매개 변수 값은 비어 있지 않은 GUID가 및 DDEX 공급자 호출 하는 경우,이 메서드는 확인 GetType 메서드를 사용할 수 있는 경우. 호출 형식이 없는 시점에서 사용할 수 있는는 GetType 방법.

예제

다음 코드는 공급자별 형식 이름 사용 하 여이 메서드를 호출 하 고 다음이 형식의 인스턴스를 만드는 방법을 보여 줍니다.

using System;
using Microsoft.VisualStudio.Data.Core;
using Microsoft.VisualStudio.Data.Services.SupportEntities;

public class DDEX_IVsDataProviderExample6
{
    public static IVsDataObjectSelector CreateObjectSelector(
        IVsDataProvider provider, string objectSelectorTypeName)
    {
        Type objectSelectorType = provider.GetType(objectSelectorTypeName);
        return Activator.CreateInstance(objectSelectorType)
            as IVsDataObjectSelector;
    }
}

.NET Framework 보안

참고 항목

참조

IVsDataProvider 인터페이스

GetType 오버로드

Microsoft.VisualStudio.Data.Core 네임스페이스