Redigera

Dela via


WorkflowPersistenceService.UnloadOnIdle(Activity) Method

Definition

Determines whether a workflow should be unloaded when idle.

protected public:
 abstract bool UnloadOnIdle(System::Workflow::ComponentModel::Activity ^ activity);
protected internal abstract bool UnloadOnIdle (System.Workflow.ComponentModel.Activity activity);
abstract member UnloadOnIdle : System.Workflow.ComponentModel.Activity -> bool
Protected Friend MustOverride Function UnloadOnIdle (activity As Activity) As Boolean

Parameters

activity
Activity

An Activity that represents the completed scope.

Returns

If true, the workflow runtime engine unloads the specified workflow when it becomes idle.

Examples

The following example demonstrates an implementation of the UnloadOnIdle method. This example is from the Custom Persistence Service sample, from the FilePersistenceService.cs file. For more information, see Custom Persistence Service Sample.

protected override bool UnloadOnIdle(Activity activity)
{
    return unloadOnIdle;
}
' Returns status of unloadOnIdle flag
Protected Overrides Function UnloadOnIdle(ByVal rootActivity As System.Workflow.ComponentModel.Activity) As Boolean
    Return unloadOnIdleValue
End Function

Applies to