WorkflowApplication.PersistableIdle 属性

定义

获取或设置在当前工作流实例处于空闲状态且可持久保存时调用的委托。

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;
};

注解

当工作流处于空闲状态并可以持久保存 IdlePersistableIdle 按该顺序调用时。 处理程序PersistableIdle返回的枚举值PersistableIdleActionNone一,PersistUnload

适用于