ClientBase<TChannel>.InvokeAsync 方法

定义

支持实现基于事件的异步模式。 有关此模式的详细信息,请参阅 基于事件的异步模式概述

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)

参数

beginOperationDelegate
ClientBase<TChannel>.BeginOperationDelegate

用于调用异步操作的委托。

inValues
Object[]

异步调用的输入值。

endOperationDelegate
ClientBase<TChannel>.EndOperationDelegate

一个委托,用于在异步调用完成后结束。

operationCompletedCallback
SendOrPostCallback

在异步方法完成时调用的客户端提供的回调。 回调传递给 ClientBase<TChannel>.BeginOperationDelegate.

userState
Object

userState 与异步调用关联的对象。

注解

在每次调用userState的参数中InvokeAsync(ClientBase<TChannel>.BeginOperationDelegate, Object[], ClientBase<TChannel>.EndOperationDelegate, SendOrPostCallback, Object)提供唯一值(如 GUID 或哈希代码),并在每个操作完成时,事件处理程序可以确定引发完成事件的操作实例。

适用于