ClientBase<TChannel>.InvokeAsync Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Зворотний зв’язок
https://aka.ms/ContentUserFeedback.
Очікується незабаром: протягом 2024 року ми будемо припиняти використання механізму реєстрації проблем у GitHub для зворотного зв’язку щодо вмісту й замінювати його новою системою зворотного зв’язку. Докладніше:Надіслати й переглянути відгук про