Compartir a través de


IVsDataProvider.TryCreateObject (Método) (Guid, Type)

尝试为指定的创建 DDEX 支持实体的实例由 DDEX 提供程序实现的 DDEX 指定的数据源。

Espacio de nombres:  Microsoft.VisualStudio.Data.Core
Ensamblado:  Microsoft.VisualStudio.Data.Core (en Microsoft.VisualStudio.Data.Core.dll)

Sintaxis

'Declaración
Function TryCreateObject ( _
    source As Guid, _
    objType As Type _
) As Object
Object TryCreateObject(
    Guid source,
    Type objType
)
Object^ TryCreateObject(
    Guid source, 
    Type^ objType
)
abstract TryCreateObject : 
        source:Guid * 
        objType:Type -> Object
function TryCreateObject(
    source : Guid, 
    objType : Type
) : Object

Parámetros

  • source
    Tipo: Guid

    一 DDEX 标识符或 Empty 数据源没有特定数据源。

  • objType
    Tipo: Type

    DDEX 支持实体的类型。

Valor devuelto

Tipo: Object
指定的 DDEX 支持实体的实例由 DDEX 提供程序实现的 DDEX 指定的数据源,DDEX,如果提供程序支持该功能;否则,返回 nullreferencia null (Nothing en Visual Basic)。

Excepciones

Excepción Condición
ArgumentNullException

支持实体的新实例化的实例引发了异常,因为调用 CreateInstance 的方法通过反射或通过 DDEX 提供程序的 CreateObjectCreateObject 不合格的默认或客户端对象的实现的某个方法实现或创建一个 (如果有)。

Comentarios

TryCreateObject 方法的委托,此方法将 Object 作为 TSite 常规参数值和 nullreferencia null (Nothing en Visual Basic) 作为 site 参数。

Seguridad de .NET Framework

Vea también

Referencia

IVsDataProvider Interfaz

TryCreateObject (Sobrecarga)

Microsoft.VisualStudio.Data.Core (Espacio de nombres)