Compartir vía


InstancePersistenceContext.SetCancellationHandler Método

Definición

Establece el controlador de cancelación que se debe invocar cuando se solicita la cancelación de una operación.

public:
 void SetCancellationHandler(Action<System::Runtime::DurableInstancing::InstancePersistenceContext ^> ^ cancellationHandler);
public void SetCancellationHandler (Action<System.Runtime.DurableInstancing.InstancePersistenceContext> cancellationHandler);
member this.SetCancellationHandler : Action<System.Runtime.DurableInstancing.InstancePersistenceContext> -> unit
Public Sub SetCancellationHandler (cancellationHandler As Action(Of InstancePersistenceContext))

Parámetros

cancellationHandler
Action<InstancePersistenceContext>

Referencia a una función que se debe invocar.

Comentarios

Si se llama al controlador de cancelación, el proveedor de persistencia debe cancelar todas las operaciones pendientes y producir la excepción OperationCanceledException desde TryCommand para indicar que el comando de persistencia se interrumpió antes de que se pudiera completar.

Se aplica a