Compartilhar via


IMethod.CreateDefaultParameterInstances Method

Creates default values of the parameters for the given method instance.

Namespace:  Microsoft.BusinessData.MetadataModel
Assembly:  Microsoft.BusinessData (in Microsoft.BusinessData.dll)

Syntax

'Declaration
Function CreateDefaultParameterInstances ( _
    methodInstance As IMethodInstance _
) As Object()
'Usage
Dim instance As IMethod
Dim methodInstance As IMethodInstance
Dim returnValue As Object()

returnValue = instance.CreateDefaultParameterInstances(methodInstance)
Object[] CreateDefaultParameterInstances(
    IMethodInstance methodInstance
)

Parameters

Return Value

Type: []
The object array containing parameters.

Remarks

If the method doesn't contain any parameters an array of zero length will be returned. The returned array contains a value for each of the parameters of the method in the index specified by the OrdinalNumber property of the parameter. For “In” and “InOut” parameters, a value will be created based on the default values corresponding to the given MethodInstance. For “Out” and “Return” parameters the value will be a null reference (Nothing in Visual Basic).

This method throws an InvalidMetadataObjectException exception when there is more than one Return parameter.

The method also throws ArgumentNulException when the MethodInstance parameter is a null reference (Nothing in Visual Basic).

The exception ArgumentException is thrown when the MethodIntance object passed to this method as a parameter doesn't belong to the Method object.

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.

Examples

Code Snippet: Set the Parameters Object Before Calling a GenericInvoker

See Also

Reference

IMethod Interface

IMethod Members

Microsoft.BusinessData.MetadataModel Namespace