ערוך

שתף באמצעות


ClientBase<TChannel>.InvokeAsync 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
Protected Sub InvokeAsync (beginOperationDelegate As ClientBase(Of TChannel).BeginOperationDelegate, inValues As Object(), endOperationDelegate As ClientBase(Of TChannel).EndOperationDelegate, operationCompletedCallback As SendOrPostCallback, userState As Object)

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

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

userState
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>.BeginOperationDelegate, Object[], ClientBase<TChannel>.EndOperationDelegate, SendOrPostCallback, Object), and when each operation is completed, your event handler can determine which instance of the operation raised the completion event.

Applies to