Share via


IVsDataProvider.TryCreateObject<TObject> Method (Guid)

Tries to create an instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider.

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

Syntax

'Declaration
Function TryCreateObject(Of TObject) ( _
    source As Guid _
) As TObject
TObject TryCreateObject<TObject>(
    Guid source
)
generic<typename TObject>
TObject TryCreateObject(
    Guid source
)
abstract TryCreateObject : 
        source:Guid -> 'TObject 
JScript does not support generic types or methods.

Type Parameters

  • TObject
    The object.

Parameters

  • source
    Type: System.Guid

    A DDEX data source identifier, or Empty for no specific data source.

Return Value

Type: TObject
An instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider, if the DDEX provider supports it. Otherwise, the default instance of type TObject.

Exceptions

Exception Condition
[DataProviderException]

Instantiation of a new instance of the support entity threw an exception, whether by way of a CreateInstance call through reflection or through the DDEX provider’s CreateObject or CreateObject method implementation, or creation of the default or client object implementation (if there is one) failed.

Remarks

This method delegates to the TryCreateObject method, passing Object as the TSite generic parameter value and nulla null reference (Nothing in Visual Basic) as the site parameter.

.NET Framework Security

See Also

Reference

IVsDataProvider Interface

TryCreateObject Overload

Microsoft.VisualStudio.Data.Core Namespace