WorkflowApplication.PersistableIdle 屬性
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
取得或設定當目前工作流程實例閒置且可持久化時所呼叫的代理。
public:
property Func<System::Activities::WorkflowApplicationIdleEventArgs ^, System::Activities::PersistableIdleAction> ^ PersistableIdle { Func<System::Activities::WorkflowApplicationIdleEventArgs ^, System::Activities::PersistableIdleAction> ^ get(); void set(Func<System::Activities::WorkflowApplicationIdleEventArgs ^, System::Activities::PersistableIdleAction> ^ value); };
public Func<System.Activities.WorkflowApplicationIdleEventArgs,System.Activities.PersistableIdleAction> PersistableIdle { get; set; }
member this.PersistableIdle : Func<System.Activities.WorkflowApplicationIdleEventArgs, System.Activities.PersistableIdleAction> with get, set
Public Property PersistableIdle As Func(Of WorkflowApplicationIdleEventArgs, PersistableIdleAction)
屬性值
當目前工作流程實例閒置且可持續執行時,會被呼叫的代理。
範例
以下範例處理 PersistableIdle 處理器,並指示執行時持續執行並卸載工作流程。
wfApp.PersistableIdle = delegate(WorkflowApplicationIdleEventArgs e)
{
// Instruct the runtime to persist and unload the workflow
return PersistableIdleAction.Unload;
};
備註
當工作流程變得閒置且可持續執行時, Idle 會依此順序同時呼叫 和 PersistableIdle 。 PersistableIdle處理器回傳 、 PersistableIdleActionNone、 或 Persist的列Unload舉值之一。