Share via


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

'Declaration
Public Sub DeriveParametersAsync ( _
    command As String, _
    commandType As DataCommandType, _
    commandTimeout As Integer, _
    userState As Object _
)
public void DeriveParametersAsync(
    string command,
    DataCommandType commandType,
    int commandTimeout,
    Object userState
)
public:
virtual void DeriveParametersAsync(
    String^ command, 
    DataCommandType commandType, 
    int commandTimeout, 
    Object^ userState
) sealed
abstract DeriveParametersAsync : 
        command:string * 
        commandType:DataCommandType * 
        commandTimeout:int * 
        userState:Object -> unit  
override DeriveParametersAsync : 
        command:string * 
        commandType:DataCommandType * 
        commandTimeout:int * 
        userState:Object -> unit
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 nulla 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.

Note

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

.NET Framework Security

See Also

Reference

DataAsyncCommand Class

Microsoft.VisualStudio.Data.Framework Namespace