Düzenle

Aracılığıyla paylaş


SqlTrackingWorkflowInstance.Refresh Method

Definition

Updates the property data for this SqlTrackingWorkflowInstance.

public:
 void Refresh();
public void Refresh ();
member this.Refresh : unit -> unit
Public Sub Refresh ()

Remarks

Refresh does not actually load any data for the SqlTrackingWorkflowInstance. To optimize database performance, the SqlTrackingWorkflowInstance class loads data for its collection properties on an as-required basis. 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. Refresh sets the timestamp that corresponds to the last refresh to DateTime.UtcNow.

Applies to