ClientBase<TChannel>.InvokeAsync Metoda

Definicja

Zapewnia obsługę implementowania wzorca asynchronicznego opartego na zdarzeniach. Aby uzyskać więcej informacji na temat tego wzorca, zobacz Omówienie wzorca asynchronicznego opartego na zdarzeniach.

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)

Parametry

beginOperationDelegate
ClientBase<TChannel>.BeginOperationDelegate

Delegat, który jest używany do wywoływania operacji asynchronicznej.

inValues
Object[]

Wartości wejściowe wywołania asynchronicznego.

endOperationDelegate
ClientBase<TChannel>.EndOperationDelegate

Delegat, który jest używany do zakończenia wywołania asynchronicznego po jego zakończeniu.

operationCompletedCallback
SendOrPostCallback

Wywołanie zwrotne dostarczone przez klienta, które jest wywoływane po zakończeniu metody asynchronicznej. Wywołanie zwrotne jest przekazywane do elementu ClientBase<TChannel>.BeginOperationDelegate.

userState
Object

userState Obiekt do skojarzenia z wywołaniem asynchronicznym.

Uwagi

Podaj unikatową wartość, taką jak identyfikator GUID lub kod skrótu, w parametrze userState dla każdego wywołania metody InvokeAsync(ClientBase<TChannel>.BeginOperationDelegate, Object[], ClientBase<TChannel>.EndOperationDelegate, SendOrPostCallback, Object), a po zakończeniu każdej operacji program obsługi zdarzeń może określić, które wystąpienie operacji wzbudziło zdarzenie ukończenia.

Dotyczy