ClientBase<TChannel>.InvokeAsync(ClientBase<TChannel>, Object[], ClientBase<TChannel>, SendOrPostCallback, Object) ClientBase<TChannel>.InvokeAsync(ClientBase<TChannel>, Object[], ClientBase<TChannel>, SendOrPostCallback, Object) ClientBase<TChannel>.InvokeAsync(ClientBase<TChannel>, Object[], ClientBase<TChannel>, SendOrPostCallback, Object) Method

Definition

Provides support for implementing the event-based asynchronous pattern. For more information about this pattern, see Event-based Asynchronous Pattern Overview.

protected:
 void InvokeAsync(System::ServiceModel::ClientBase<TChannel>::BeginOperationDelegate ^ beginOperationDelegate, cli::array <System::Object ^> ^ inValues, System::ServiceModel::ClientBase<TChannel>::EndOperationDelegate ^ endOperationDelegate, System::Threading::SendOrPostCallback ^ operationCompletedCallback, System::Object ^ userState);
protected void InvokeAsync (System.ServiceModel.ClientBase<TChannel>.BeginOperationDelegate beginOperationDelegate, object[] inValues, System.ServiceModel.ClientBase<TChannel>.EndOperationDelegate endOperationDelegate, System.Threading.SendOrPostCallback operationCompletedCallback, object userState);
member this.InvokeAsync : System.ServiceModel.ClientBase<'Channel (requires 'Channel : null)>.BeginOperationDelegate * obj[] * System.ServiceModel.ClientBase<'Channel (requires 'Channel : null)>.EndOperationDelegate * System.Threading.SendOrPostCallback * obj -> unit

Parameters

beginOperationDelegate
ClientBase<TChannel>.BeginOperationDelegate

A delegate that is used for calling the asynchronous operation.

inValues
Object[]

The input values to the asynchronous call.

endOperationDelegate
ClientBase<TChannel>.EndOperationDelegate

A delegate that is used to end the asynchronous call after it has completed.

operationCompletedCallback
SendOrPostCallback SendOrPostCallback SendOrPostCallback

A client-supplied callback that is invoked when the asynchronous method is complete. The callback is passed to the ClientBase<TChannel>.BeginOperationDelegate.

userState
Object Object Object

The userState object to associate with the asynchronous call.

Remarks

Provide a unique value, such as a GUID or hash code, in the userState parameter for each call to InvokeAsync(ClientBase<TChannel>, Object[], ClientBase<TChannel>, SendOrPostCallback, Object), and when each operation is completed, your event handler can determine which instance of the operation raised the completion event.

Applies to