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