SqlTrackingWorkflowInstance.AutoRefresh Property

Gets or sets a value which specifies whether property data for this SqlTrackingWorkflowInstance should be automatically updated when it is accessed.

Namespace: System.Workflow.Runtime.Tracking
Assembly: System.Workflow.Runtime (in system.workflow.runtime.dll)

public bool AutoRefresh { get; set; }
/** @property */
public boolean get_AutoRefresh ()

/** @property */
public void set_AutoRefresh (boolean value)

public function get AutoRefresh () : boolean

public function set AutoRefresh (value : boolean)

Not applicable.

Property Value

true if property data should be automatically refreshed when it is accessed; otherwise, false.

To optimize database performance, properties which maintain collections of queried data, such as ActivityEvents, query the database for new elements only when the property is accessed, and the collection for such a property is only updated on an as-needed basis when the property is accessed. The SqlTrackingWorkflowInstance class maintains two timestamps for each property: one which indicates the time that tracking data for the collection was last loaded, and another which indicates the last time the SqlTrackingWorkflowInstance was refreshed. When you get one of the collection properties, the SqlTrackingWorkflowInstance loads any tracking data that was added to the database between the last time tracking data for the collection was loaded and the last time the SqlTrackingWorkflowInstance was refreshed and adds this data to the collection maintained by the property. The timestamp that indicates the last time data was loaded for the property is then set to the value of the timestamp that indicates the last refresh. If these two timestamps are equal, additional tracking data will not be loaded for the property when it is accessed. Set AutoRefresh to true in order to perform a refresh every time a collection property is accessed and ensure that the tracking data returned in the collection maintained by that property is always current. If AutoRefresh is false, you must call Refresh in order to reset the timestamp that corresponds to the last refresh.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0