DataSourceSpecializer.CreateObject Method

Creates a DDEX-provider implemented object of the given type that is specialized for the specified data source.

Namespace:  Microsoft.VisualStudio.Data
Assembly:  Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)

Syntax

'宣言
Public Overridable Function CreateObject ( _
    dataSource As Guid, _
    objType As Type _
) As Object
'使用
Dim instance As DataSourceSpecializer
Dim dataSource As Guid
Dim objType As Type
Dim returnValue As Object

returnValue = instance.CreateObject(dataSource, _
    objType)
public virtual Object CreateObject(
    Guid dataSource,
    Type objType
)
public:
virtual Object^ CreateObject(
    Guid dataSource, 
    Type^ objType
)
public function CreateObject(
    dataSource : Guid, 
    objType : Type
) : Object

Parameters

  • dataSource
    Type: System.Guid

    GUID of the data source for which the provider is specialized.

  • objType
    Type: System.Type

    Data type of the provider object.

Return Value

Type: System.Object

Returns a specialized object of specified type.

Exceptions

Exception Condition
ArgumentException

The data source specified with the dataSource parameter is not a registered DDEX data source.

Permissions

See Also

Reference

DataSourceSpecializer Class

DataSourceSpecializer Members

Microsoft.VisualStudio.Data Namespace