DiscoveryClient.CancelAsync(Object) Método

Definición

Cancela una operación asincrónica pendiente.Cancels a pending asynchronous operation.

public:
 void CancelAsync(System::Object ^ userState);
public void CancelAsync (object userState);
member this.CancelAsync : obj -> unit
Public Sub CancelAsync (userState As Object)

Parámetros

userState
Object

Un objeto de estado especificado por el usuario que se pasa al método FindAsync o a uno de los métodos ResolveAsync.A user specified state object that is passed to the FindAsync method or one of the ResolveAsync methods. Identifica la operación asincrónica pendiente de cancelar.It identifies the pending asynchronous operation to cancel.

Comentarios

ArgumentNullExceptionSe produce una excepción si userState es null .An ArgumentNullException is thrown if userState is null. Si FindAsync ResolveAsync se llama a varias operaciones o con el mismo userState valor, y CancelAsync se llama a con ese userState valor, InvalidOperationException se produce una excepción.If multiple FindAsync or ResolveAsync operations are called with the same userState value, and CancelAsync is called with that userState value, an InvalidOperationException is thrown.

Se aplica a