InstancePersistenceContext.SetCancellationHandler 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
设置在请求取消操作时要调用的取消处理程序。
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,以指示持久性命令在完成之前中断。