Szerkesztés

Megosztás a következőn keresztül:


SqlTrackingWorkflowInstance.AutoRefresh Property

Definition

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

public:
 property bool AutoRefresh { bool get(); void set(bool value); };
public bool AutoRefresh { get; set; }
member this.AutoRefresh : bool with get, set
Public Property AutoRefresh As Boolean

Property Value

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

Remarks

To optimize database performance, properties that 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-required basis when the property is accessed. The SqlTrackingWorkflowInstance class maintains two timestamps for each property: one that indicates the time that tracking data for the collection was last loaded, and another that 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 is not loaded for the property when it is accessed. Set AutoRefresh to true 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 to reset the timestamp that corresponds to the last refresh.

Applies to