Lanes
ConsoleMonster.Widgets
One row per worker or item, for parallel workloads: a status marker (spinner while running), the label, a progress bar, the percentage, pass/fail/warning counts and what the lane is doing now. When there are more lanes than rows, running lanes are kept visible and the rest is summarised in a final line. Live operations (Key = lane): add (Text = label, Total), advance (Value = steps, State = step result, Text = detail), state (State, Text), label and detail (Text, including explicit clears), total (Total), complete (State).
Inheritance
- LiveWidget
- Lanes
Usage
Explore 67 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 33
- Method Ui.Lanes
- Extension method Lanes.BoldActive
- Extension method Lanes.CollapseWhen
- Extension method Lanes.CollapseWhenFinished
- Extension method Lanes.Column
- Extension method Lanes.Columns
- Extension method Lanes.CountColumn
- Extension method Lanes.CountSkipped
- Extension method Lanes.DimPending
- Extension method Lanes.HideCompleted
- Extension method Lanes.MaxLabelWidth
- Extension method Lanes.PercentColumn
- Extension method Lanes.RateWindow
- Extension method Lanes.Shape
- Extension method Lanes.ShowDetail
- Extension method Lanes.ShowRunningCount
- Extension method Lanes.Transient
- Method LanesFluent.BoldActive
- Method LanesFluent.CollapseWhen
- Method LanesFluent.CollapseWhenFinished
- Method LanesFluent.Column
- Method LanesFluent.Columns
- Method LanesFluent.CountColumn
- Method LanesFluent.CountSkipped
- Method LanesFluent.DimPending
- Method LanesFluent.HideCompleted
- Method LanesFluent.MaxLabelWidth
- Method LanesFluent.PercentColumn
- Method LanesFluent.RateWindow
- Method LanesFluent.Shape
- Method LanesFluent.ShowDetail
- Method LanesFluent.ShowRunningCount
- Method LanesFluent.Transient
Accepted by parameters 34
- Method ContentBuilder.Lanes
- Method ContentBuilder.Lanes
- Extension method Lanes.BoldActive
- Extension method Lanes.CollapseWhen
- Extension method Lanes.CollapseWhenFinished
- Extension method Lanes.Column
- Extension method Lanes.Columns
- Extension method Lanes.CountColumn
- Extension method Lanes.CountSkipped
- Extension method Lanes.DimPending
- Extension method Lanes.HideCompleted
- Extension method Lanes.MaxLabelWidth
- Extension method Lanes.PercentColumn
- Extension method Lanes.RateWindow
- Extension method Lanes.Shape
- Extension method Lanes.ShowDetail
- Extension method Lanes.ShowRunningCount
- Extension method Lanes.Transient
- Method LanesFluent.BoldActive
- Method LanesFluent.CollapseWhen
- Method LanesFluent.CollapseWhenFinished
- Method LanesFluent.Column
- Method LanesFluent.Columns
- Method LanesFluent.CountColumn
- Method LanesFluent.CountSkipped
- Method LanesFluent.DimPending
- Method LanesFluent.HideCompleted
- Method LanesFluent.MaxLabelWidth
- Method LanesFluent.PercentColumn
- Method LanesFluent.RateWindow
- Method LanesFluent.Shape
- Method LanesFluent.ShowDetail
- Method LanesFluent.ShowRunningCount
- Method LanesFluent.Transient
Constructors
public Lanes(string widgetId = "lanes") #Creates a lanes widget.
Parameters
- widgetId string = "lanes"
- The live name (default lanes).
Methods
public Lane Add(string key, string? label = null, double total = 0) #Adds a lane or updates its label and total.
Parameters
- key string
- Unique key.
- label string? = null
- Label, or null to use the key.
- total double = 0
- Planned steps (0 = unknown).
public Lane Add(string key, RichText label, double total = 0) #Adds a lane with a multicolour label, or updates its label and total.
Parameters
- key string
- Unique key.
- label ConsoleMonster.Text.RichText
- The rich label.
- total double = 0
- Planned steps (0 = unknown).
public Lane Add(Lane snapshot) #Adds or replaces a lane's complete snapshot, including elapsed-time boundaries and result counts.
Parameters
- snapshot ConsoleMonster.Widgets.Lane
- The lane state to copy. Its key identifies the destination; destination insertion order is preserved.
Returns
Lane The destination lane. Numeric and timing state is copied; styled text references are retained.public override void Apply(LiveEvent liveEvent) #Applies an event to the widget's state.
Parameters
- liveEvent ConsoleMonster.Live.LiveEvent
- The event.
public override string? Describe(LiveEvent liveEvent) #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
string? A plain line or null.public string? GetSummaryLine() #A one-line summary (used for heartbeats in Stream/Plain mode).
Returns
string? The summary, or null when there are no lanes.public LanesHandle Handle(ILiveDispatcher dispatcher) #Returns a handle that updates these lanes through a dispatcher.
Parameters
- dispatcher ConsoleMonster.Live.ILiveDispatcher
- The dispatcher.
public override Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public override void Render(Region region, RenderContext context) #Renders 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 bool TryGetTaskbarProgress(out TaskbarState state, out double fraction) #The overall progress for the terminal's indicator: the share of all steps done (finished lanes count in full), red when a lane failed, yellow with warnings, indeterminate while totals are unknown. Nothing once all passed.
Parameters
- state ConsoleMonster.Output.TaskbarState
- The state.
- fraction double
- The fraction done, or NaN.
Returns
bool False when there is nothing to report.Inherited Methods
Properties
public BarShape Shape { get; set; } #The bar shape: BarShape.Line (default, thin strokes that keep rows apart) or BarShape.Block.
public ColumnFormat CountColumn { get; set; } #Layout of the pass, fail and warning count columns. Each count is its own column across all rows: the symbol stays put and the number is right-aligned. Digits are reserved from the largest lane total (when totals are known) and from the largest count displayed so far, so columns never move during a run.
public ColumnFormat PercentColumn { get; set; } #Layout of the percentage column (default right-aligned, four cells for "100%").
public bool CountSkipped { get; set; } #Whether the third count column shows skipped steps (– / -) instead of warnings (▴ / !), for runs where skips matter more, such as test runs.
public IList<ProgressColumn>? Columns { get; set; } #The columns of each row (see ProgressColumns, for example ProgressColumns.Standard plus ProgressColumns.Rate or a custom column), or null (default) for the classic layout: marker, label, bar, percentage, pass/fail/warning counts and detail. With columns set, the stream heartbeat line also summarises the running lanes through them.
public bool HideCompleted { get; set; } #Whether finished lanes leave the display (counted in the summary line), so only running and queued work shows.
public bool CollapseWhenFinished { get; set; } #Whether the display collapses to one summary line (12 done in 1m 05s) once every lane has finished.
public bool Transient { get; set; } #Whether the display disappears once every lane has finished (it measures zero rows), so an inline session ends with nothing left of it. Combine with LiveSessionOptions.PrintFinalState off for a fully transient session.
public bool DimPending { get; set; } #Whether a waiting (pending) lane's label is dimmed (default true).
public bool BoldActive { get; set; } #Whether a running lane's label is bold, so the active work stands out (default false).
public bool ShowRunningCount { get; set; } #Whether a last row counts the running lanes ("● 3 running") while any run (default false).
public StatusKind? CollapseWhen { get; set; } #A state whose lanes fold into one summary row instead of a row each, for example StatusKind.Skip: "– 2 skipped: Alpha (46) · Beta (5)". Null (default) keeps every lane on its own row.
public TimeSpan RateWindow { get; set; } #The moving window that smooths rates and remaining-time estimates (default 10 seconds).
Inherited Properties
Extension Methods
public static Lanes BoldActive(Lanes lanes, bool value = true) #Sets Lanes.BoldActive: Whether a running lane's label is bold, so the active work stands out (default false).
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { BoldActive = value }; Ui.Lanes().BoldActive(value);public static Lanes CollapseWhen(Lanes lanes, StatusKind? value) #Sets Lanes.CollapseWhen: A state whose lanes fold into one summary row instead of a row each, for example StatusKind.Skip: "– 2 skipped: Alpha (46) · Beta (5)". Null (default) keeps every lane on its own row.
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value ConsoleMonster.Styling.StatusKind?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { CollapseWhen = value }; Ui.Lanes().CollapseWhen(value);public static Lanes CollapseWhenFinished(Lanes lanes, bool value = true) #Sets Lanes.CollapseWhenFinished: Whether the display collapses to one summary line (12 done in 1m 05s) once every lane has finished.
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { CollapseWhenFinished = value }; Ui.Lanes().CollapseWhenFinished(value);public static Lanes Column(Lanes lanes, ProgressColumn item) #Adds an item to Lanes.Columns: The columns of each row (see ProgressColumns, for example ProgressColumns.Standard plus ProgressColumns.Rate or a custom column), or null (default) for the classic layout: marker, label, bar, percentage, pass/fail/warning counts and detail. With columns set, the stream heartbeat line also summarises the running lanes through them.
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- item ConsoleMonster.Widgets.ProgressColumn
- The item.
public static Lanes Columns(Lanes lanes, IEnumerable<ProgressColumn> items) #Adds items to Lanes.Columns: The columns of each row (see ProgressColumns, for example ProgressColumns.Standard plus ProgressColumns.Rate or a custom column), or null (default) for the classic layout: marker, label, bar, percentage, pass/fail/warning counts and detail. With columns set, the stream heartbeat line also summarises the running lanes through them.
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Widgets.ProgressColumn>
- The items, in order.
public static Lanes CountColumn(Lanes lanes, ColumnFormat value) #Sets Lanes.CountColumn: Layout of the pass, fail and warning count columns. Each count is its own column across all rows: the symbol stays put and the number is right-aligned. Digits are reserved from the largest lane total (when totals are known) and from the largest count displayed so far, so columns never move during a run.
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value ConsoleMonster.Layout.ColumnFormat
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { CountColumn = value }; Ui.Lanes().CountColumn(value);public static Lanes CountColumn(Lanes lanes, Action<ColumnFormat> configure) #Configures Lanes.CountColumn in place: Layout of the pass, fail and warning count columns. Each count is its own column across all rows: the symbol stays put and the number is right-aligned. Digits are reserved from the largest lane total (when totals are known) and from the largest count displayed so far, so columns never move during a run.
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- configure System.Action<ConsoleMonster.Layout.ColumnFormat>
- Configures the value.
public static Lanes CountSkipped(Lanes lanes, bool value = true) #Sets Lanes.CountSkipped: Whether the third count column shows skipped steps (– / -) instead of warnings (▴ / !), for runs where skips matter more, such as test runs.
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { CountSkipped = value }; Ui.Lanes().CountSkipped(value);public static Lanes DimPending(Lanes lanes, bool value = true) #Sets Lanes.DimPending: Whether a waiting (pending) lane's label is dimmed (default true).
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { DimPending = value }; Ui.Lanes().DimPending(value);public static Lanes HideCompleted(Lanes lanes, bool value = true) #Sets Lanes.HideCompleted: Whether finished lanes leave the display (counted in the summary line), so only running and queued work shows.
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { HideCompleted = value }; Ui.Lanes().HideCompleted(value);public static Lanes MaxLabelWidth(Lanes lanes, int value) #Sets Lanes.MaxLabelWidth: The widest label column (default 28).
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { MaxLabelWidth = value }; Ui.Lanes().MaxLabelWidth(value);public static Lanes PercentColumn(Lanes lanes, ColumnFormat value) #Sets Lanes.PercentColumn: Layout of the percentage column (default right-aligned, four cells for "100%").
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value ConsoleMonster.Layout.ColumnFormat
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { PercentColumn = value }; Ui.Lanes().PercentColumn(value);public static Lanes PercentColumn(Lanes lanes, Action<ColumnFormat> configure) #Configures Lanes.PercentColumn in place: Layout of the percentage column (default right-aligned, four cells for "100%").
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- configure System.Action<ConsoleMonster.Layout.ColumnFormat>
- Configures the value.
public static Lanes RateWindow(Lanes lanes, TimeSpan value) #Sets Lanes.RateWindow: The moving window that smooths rates and remaining-time estimates (default 10 seconds).
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value System.TimeSpan
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { RateWindow = value }; Ui.Lanes().RateWindow(value);public static Lanes Shape(Lanes lanes, BarShape value) #Sets Lanes.Shape: The bar shape: BarShape.Line (default, thin strokes that keep rows apart) or BarShape.Block.
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value ConsoleMonster.Widgets.BarShape
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { Shape = value }; Ui.Lanes().Shape(value);public static Lanes ShowDetail(Lanes lanes, bool value = true) #Sets Lanes.ShowDetail: Whether the detail column is shown (default true).
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { ShowDetail = value }; Ui.Lanes().ShowDetail(value);public static Lanes ShowRunningCount(Lanes lanes, bool value = true) #Sets Lanes.ShowRunningCount: Whether a last row counts the running lanes ("● 3 running") while any run (default false).
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { ShowRunningCount = value }; Ui.Lanes().ShowRunningCount(value);public static Lanes Transient(Lanes lanes, bool value = true) #Sets Lanes.Transient: Whether the display disappears once every lane has finished (it measures zero rows), so an inline session ends with nothing left of it. Combine with LiveSessionOptions.PrintFinalState off for a fully transient session.
Parameters
- lanes ConsoleMonster.Widgets.Lanes
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Widgets.Lanes { Transient = value }; Ui.Lanes().Transient(value);