InstancePersistenceContext.SetCancellationHandler 方法

定义

设置在请求取消操作时要调用的取消处理程序。

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

参数

cancellationHandler
Action<InstancePersistenceContext>

对要调用的函数的引用。

注解

如果调用取消处理程序,持久性提供程序应取消所有挂起的操作,并从 TryCommand 引发 OperationCanceledException,以指示持久性命令在完成之前中断。

适用于