DataProviderObjectFactory.CreateObject Method
Creates an instance of the specified DDEX support entity implemented by the DDEX provider.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'宣言
Public MustOverride Function CreateObject ( _
objType As Type _
) As Object
'使用
Dim instance As DataProviderObjectFactory
Dim objType As Type
Dim returnValue As Object
returnValue = instance.CreateObject(objType)
public abstract Object CreateObject(
Type objType
)
public:
virtual Object^ CreateObject(
Type^ objType
) abstract
public abstract function CreateObject(
objType : Type
) : Object
Parameters
objType
Type: System.TypeA type of DDEX support entity.
Return Value
Type: System.Object
An instance of the specified DDEX support entity implemented by the DDEX provider, if the DDEX provider supports it; otherwise, a null reference (Nothing in Visual Basic).
Implements
IVsDataProviderObjectFactory.CreateObject(Type)
Remarks
A provider implements this method to return top-level support entities, that is, those normally created directly by a client as opposed to indirectly by querying a data connection for a service or creating a type referenced from a data support XML file.
DDEX support entities that you can create by using this method:
Objects that implement the other support entity interfaces are created by other means, such as indirectly by querying a data connection for a service or creating a type referenced from a data support XML file.
Notes to Inheritors:
The derived class must override this method.
Permissions
- 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.
See Also
Reference
DataProviderObjectFactory Class