API Reference
Class
RunTracker
The state of a run of many items (ConsoleRun, ForEach-ConsoleItem), safe to update from any thread: each item is pending, running or finished with an outcome; failures keep their message. RunView draws it.
Inheritance
- Object
- RunTracker
Usage
Explore 2 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 1
- Property RunMonitor.Tracker
Accepted by parameters 1
- Constructor RunView.RunView
Constructors
public RunTracker(Int32 total, Func<TimeSpan>? clock = null) #Creates a tracker.
Parameters
- total System.Int32
- The number of items.
- clock System.Func<System.TimeSpan>? = null
- The run clock, or null for a stopwatch started now.
Methods
public Void Complete() #Returns:
VoidThe run ended: items never started count as skipped and the clock stops.
public Void Finished(Int32 index, StatusKind outcome, String label, String? message = null, Boolean timedOut = false) #Returns:
VoidAn item finished.
Parameters
- index System.Int32
- The item's position (0-based).
- outcome ConsoleMonster.Styling.StatusKind
- Pass, Fail, Warn or Skip.
- label System.String
- Its label (for the failures list).
- message System.String? = null
- The error message of a failed item, or null.
- timedOut System.Boolean = false
- Whether it ran out of time.
public RunSnapshot Snapshot() #Returns:
RunSnapshotA consistent copy of the state, for drawing on another thread.
Returns
The snapshot.
public Void Started(Int32 index, String label) #Returns:
VoidAn item started.
Parameters
- index System.Int32
- The item's position (0-based).
- label System.String
- Its label.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?