DataAsyncCommand.DeriveParametersAsync Method

Derives, in an asynchronous manner, a set of parameters for use with a specified command.

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

Syntax

'宣言
Public Sub DeriveParametersAsync ( _
    command As String, _
    commandType As DataCommandType, _
    commandTimeout As Integer, _
    userState As Object _
)
'使用
Dim instance As DataAsyncCommand
Dim command As String
Dim commandType As DataCommandType
Dim commandTimeout As Integer
Dim userState As Object

instance.DeriveParametersAsync(command, _
    commandType, commandTimeout, userState)
public void DeriveParametersAsync(
    string command,
    DataCommandType commandType,
    int commandTimeout,
    Object userState
)
public:
virtual void DeriveParametersAsync(
    String^ command, 
    DataCommandType commandType, 
    int commandTimeout, 
    Object^ userState
) sealed
public final function DeriveParametersAsync(
    command : String, 
    commandType : DataCommandType, 
    commandTimeout : int, 
    userState : Object
)

Parameters

  • command
    Type: System.String

    Command for which the parameters are derived.

  • commandTimeout
    Type: System.Int32

    Amount of time, in seconds, before which the command times out.

  • userState
    Type: System.Object

    A unique identifier for the asynchronous process.

Implements

IVsDataAsyncCommand.DeriveParametersAsync(String, DataCommandType, Int32, Object)

Exceptions

Exception Condition
ArgumentNullException

The command or the userState parameter is a null reference (Nothing in Visual Basic).

ArgumentOutOfRangeException

The commandTimeout parameter is less than -1.

Remarks

This method performs the same operation as the DeriveParameters method, but in an asynchronous manner.

If the value of the commandTimeout parameter is 0, there is no timeout (or, timeout is infinite); if the value is -1, the timeout period is that set by the data provider.

The userState parameter uniquely identifies the specific asynchronous operation and is passed back as part of the event arguments for the DeriveParametersCompleted event so that a listener can determine which asynchronous process completed.

注意

Other exceptions that occur indicate that the parameter derivation failed for a provider-specified reason.

Permissions

See Also

Reference

DataAsyncCommand Class

DataAsyncCommand Members

Microsoft.VisualStudio.Data.Framework Namespace