API Reference
ActivityList
Nested activities with progress, the way Write-Progress describes work: each activity has an id, an optional parent, a status, a percentage (or none) and an estimate of the time left. Children are indented under their parent; completed activities disappear. Empty, it takes no space, so it can sit in any layout and appear only while something reports progress. Events: update with key "id" or "id/parentId", text = activity, state = status, value = percent (negative for unknown) and total = seconds remaining (negative for unknown); complete with the key.
Inheritance
- LiveWidget
- ActivityList
Usage
Explore 12 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 6
- Extension method ActivityList.WithMaxVisible
- Extension method ActivityList.WithShowElapsed
- Extension method ActivityList.WithShowIds
- Method ActivityListFluent.WithMaxVisible
- Method ActivityListFluent.WithShowElapsed
- Method ActivityListFluent.WithShowIds
Accepted by parameters 6
- Extension method ActivityList.WithMaxVisible
- Extension method ActivityList.WithShowElapsed
- Extension method ActivityList.WithShowIds
- Method ActivityListFluent.WithMaxVisible
- Method ActivityListFluent.WithShowElapsed
- Method ActivityListFluent.WithShowIds
Constructors
public ActivityList(String name = "$progress") #Creates an activity list.
Parameters
- name System.String = "$progress"
- The target name (default ActivityList.ProgressTarget).
Methods
public override Void Apply(LiveEvent liveEvent) #VoidApplies an event to the widget's state.
Parameters
- liveEvent ConsoleMonster.Live.LiveEvent
- The event.
public override String? Describe(LiveEvent liveEvent) #String?Returns a line describing the event for line-based outputs (Stream/Plain), or null when the event is not worth a line (for example a single counter increment). Called after ILiveTarget.Apply.
Parameters
- liveEvent ConsoleMonster.Live.LiveEvent
- The event that was applied.
Returns
A plain line or null.
public override Size Measure(Constraints constraints, RenderContext context) #SizeReturns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Returns
The desired size, never larger than the constraints.
public override Void Render(Region region, RenderContext context) #VoidRenders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public Boolean TryGetTaskbarProgress(out TaskbarState state, out Double fraction) #BooleanThe widget's contribution, if any.
Parameters
- state ConsoleMonster.Output.TaskbarState
- The state (Normal, Indeterminate, Error or Paused).
- fraction System.Double
- The fraction done (0 to 1), or NaN when unknown.
Returns
False when the widget has nothing to report.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public Int32 MaxVisible { get; set; } #The most activities shown (default 8); more are summarised in one line.
public Boolean ShowElapsed { get; set; } #Whether each row ends with the time since the activity started, right-aligned (default true).
public Boolean ShowIds { get; set; } #Whether each row starts with the activity's id (#3), for parallel work (default false).
Inherited Properties
Fields
public const String ProgressTarget #The target name the PowerShell progress bridge posts to.
$progressExtension Methods
public static ActivityList WithMaxVisible(ActivityList activityList, Int32 value) #ActivityListSets ActivityList.MaxVisible: The most activities shown (default 8); more are summarised in one line.
Parameters
- activityList ConsoleMonster.Widgets.ActivityList
- The instance.
- value System.Int32
- The value.
Returns
The same instance.
public static ActivityList WithShowElapsed(ActivityList activityList, Boolean value = true) #ActivityListSets ActivityList.ShowElapsed: Whether each row ends with the time since the activity started, right-aligned (default true).
Parameters
- activityList ConsoleMonster.Widgets.ActivityList
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.
public static ActivityList WithShowIds(ActivityList activityList, Boolean value = true) #ActivityListSets ActivityList.ShowIds: Whether each row starts with the activity's id (#3), for parallel work (default false).
Parameters
- activityList ConsoleMonster.Widgets.ActivityList
- The instance.
- value System.Boolean = true
- The value (default true).
Returns
The same instance.