ITypeReflector.Instantiate Method (ITypeDescriptor, Int32, IMethodInstance)
Instantiates a collection that corresponds to the specified TypeDescriptor using default values defined for the specified MethodInstance.
Namespace: Microsoft.BusinessData.Infrastructure
Assembly: Microsoft.BusinessData (in Microsoft.BusinessData.dll)
Syntax
'Declaration
Function Instantiate ( _
collectionTypeDescriptor As ITypeDescriptor, _
size As Integer, _
methodInstance As IMethodInstance _
) As Object
'Usage
Dim instance As ITypeReflector
Dim collectionTypeDescriptor As ITypeDescriptor
Dim size As Integer
Dim methodInstance As IMethodInstance
Dim returnValue As Object
returnValue = instance.Instantiate(collectionTypeDescriptor, _
size, methodInstance)
Object Instantiate(
ITypeDescriptor collectionTypeDescriptor,
int size,
IMethodInstance methodInstance
)
Parameters
collectionTypeDescriptor
Type: Microsoft.BusinessData.MetadataModel.ITypeDescriptorThe TypeDescriptor for the collection.
size
Type: System.Int32Initial capacity of the collection.
methodInstance
Type: Microsoft.BusinessData.MetadataModel.IMethodInstanceThe MethodInstance for which the default value is defined.
Return Value
Type: System.Object
The instantiated collection.
Remarks
Instances of objects in the Business Data Connectivity object model are tied to the Metadata Store they are obtained from. Using instances tied to one Metadata Store with the instances from another Metadata Store will cause data corruption and other unexpected behavior. For more information, see DatabaseBackedMetadataCatalog, FileBackedMetadataCatalog, and RemoteSharedFileBackedMetadataCatalog.