WorkflowApplication.PersistableIdle Property

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the T:System.Activities.ActivityFunc that is invoked when the current workflow instance is idle and can be persisted.

Namespace:   System.Activities
Assembly:  System.Activities (in System.Activities.dll)

public Func<WorkflowApplicationIdleEventArgs, PersistableIdleAction> PersistableIdle { get; set; }

Property Value

Type: System.Func<WorkflowApplicationIdleEventArgs, PersistableIdleAction>

The T:System.Activities.ActivityFunc that is invoked when the current workflow instance is idle and can be persisted.

When a workflow becomes idle and can be persisted, both Idle and PersistableIdle are invoked, in that order. The PersistableIdle handler returns one of the PersistableIdleAction enumeration values of None, Persist, or Unload.

The following example handles the PersistableIdle handler and instructs the runtime to persist and unload the workflow.

wfApp.PersistableIdle = delegate(WorkflowApplicationIdleEventArgs e)
{
    // Instruct the runtime to persist and unload the workflow
    return PersistableIdleAction.Unload;
};

.NET Framework
Available since 4.0
Return to top
Show: