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,表示持久化指令在完成前已被中斷。

適用於