ClientBase<TChannel>.InvokeAsync Méthode
Définition
Important
Certaines informations portent sur la préversion du produit qui est susceptible d’être en grande partie modifiée avant sa publication. Microsoft exclut toute garantie, expresse ou implicite, concernant les informations fournies ici.
Fournit la prise en charge de l’implémentation du modèle asynchrone basé sur les événements. Pour plus d’informations sur ce modèle, consultez Vue d’ensemble du modèle asynchrone basé sur les événements.
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)
Paramètres
- beginOperationDelegate
- ClientBase<TChannel>.BeginOperationDelegate
Délégué utilisé pour appeler l’opération asynchrone.
- inValues
- Object[]
Valeurs d’entrée de l’appel asynchrone.
- endOperationDelegate
- ClientBase<TChannel>.EndOperationDelegate
Délégué utilisé pour mettre fin à l’appel asynchrone une fois l’opération terminée.
- operationCompletedCallback
- SendOrPostCallback
Rappel fourni par le client appelé lorsque la méthode asynchrone est terminée. Le rappel est passé au ClientBase<TChannel>.BeginOperationDelegate.
- userState
- Object
Objet userState à associer à l’appel asynchrone.
Remarques
Fournissez une valeur unique, telle qu’un GUID ou un code de hachage, dans le userState paramètre de chaque appel et InvokeAsync(ClientBase<TChannel>.BeginOperationDelegate, Object[], ClientBase<TChannel>.EndOperationDelegate, SendOrPostCallback, Object)lorsque chaque opération est terminée, votre gestionnaire d’événements peut déterminer quelle instance de l’opération a déclenché l’événement d’achèvement.