This documentation is archived and is not being maintained.

WorkflowPersistenceService.UnloadOnIdle Method

Determines whether a workflow should be unloaded when idle.

Namespace:  System.Workflow.Runtime.Hosting
Assembly:  System.Workflow.Runtime (in System.Workflow.Runtime.dll)

protected internal abstract bool UnloadOnIdle(
	Activity activity


Type: System.Workflow.ComponentModel.Activity

An Activity that represents the completed scope.

Return Value

Type: System.Boolean
If true, the workflow runtime engine unloads the specified workflow when it becomes idle.

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;

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0