IVsDataProvider.CreateObject<TObject, TSite> Method (Guid, TSite)
Creates an instance of the specified DDEX support entity for the specified DDEX data source that is implemented by the DDEX provider, sited with the specified site object.
Namespace: Microsoft.VisualStudio.Data.Core
Assembly: Microsoft.VisualStudio.Data.Core (in Microsoft.VisualStudio.Data.Core.dll)
Syntax
'Declaration
Function CreateObject(Of TObject, TSite) ( _
source As Guid, _
site As TSite _
) As TObject
TObject CreateObject<TObject, TSite>(
Guid source,
TSite site
)
generic<typename TObject, typename TSite>
TObject CreateObject(
Guid source,
TSite site
)
abstract CreateObject :
source:Guid *
site:'TSite -> 'TObject
JScript does not support generic types or methods.
Type Parameters
- TObject
The object.
- TSite
The site.
Parameters
source
Type: System.GuidAn identifier of a DDEX data source, or Empty for no specific data source.
site
Type: TSiteAn instance of an object that should site the new DDEX support entity.
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, sited with the specified site object.
Exceptions
Exception | Condition |
---|---|
DataProviderException | The DDEX provider does not support the support entity, or 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 method implementation, or creation of the default or client object implementation (if there is one) failed. |
Remarks
This method delegates to the CreateObject method, passing typeof(TObject) as the objType parameter value. It then tries to cast the resulting instance to type TObject and returns.
.NET Framework Security
- 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.