Partage via


InstancePersistenceContext.SetCancellationHandler Méthode

Définition

Définit le gestionnaire d'annulation à appeler lorsque l'annulation d'une opération est demandée.

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))

Paramètres

cancellationHandler
Action<InstancePersistenceContext>

Référence à une fonction à appeler.

Remarques

Si le gestionnaire d'annulation est appelé, le fournisseur de persistance doit annuler toutes les opérations en attente et lever l'exception OperationCanceledException depuis TryCommand pour indiquer que la commande de persistance a été interrompue avant d'avoir été effectuée.

S’applique à