Skip to content
ConsoleMonster

API Reference

Class

Phases

Namespace ConsoleMonster.Widgets
Assembly ConsoleMonster
Implements
Modifiers sealed

A step strip for pipelines: ✓ Restore 2.1s › ✓ Build 12s › ⠹ Test 64% › ○ Pack. The active phase is emphasised; phases flow onto more lines when the width is short. Live operations (Key = phase): add (Text = label), state (State, Text = detail), detail (Text).

Inheritance

Usage

Explore 1 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

Constructors

public Phases(String name = "phases") #

Creates a phases widget.

Parameters

name System.String = "phases" optionalposition: 0
The live name (default phases).

Methods

public override Void Apply(LiveEvent liveEvent) #
Returns: Void

Applies an event to the widget's state.

Parameters

liveEvent ConsoleMonster.Live.LiveEvent requiredposition: 0
The event.
public override String? Describe(LiveEvent liveEvent) #
Returns: 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 requiredposition: 0
The event that was applied.

Returns

A plain line or null.

public PhasesHandle Handle(ILiveDispatcher dispatcher) #
Returns: PhasesHandle

Returns a handle that updates the phases through a dispatcher.

Parameters

dispatcher ConsoleMonster.Live.ILiveDispatcher requiredposition: 0
The dispatcher.

Returns

The handle.

public override Size Measure(Constraints constraints, RenderContext context) #
Returns: Size

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints requiredposition: 0
The space offered.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
Profile, theme and glyphs.

Returns

The desired size, never larger than the constraints.

public override Void Render(Region region, RenderContext context) #
Returns: Void

Renders into a region. The region may be smaller or larger than the measured size.

Parameters

region ConsoleMonster.Canvas.Region requiredposition: 0
The target region.
context ConsoleMonster.Canvas.RenderContext requiredposition: 1
Profile, theme and glyphs.
public Phases Set(String key, StatusKind status = Pending, String? label = null, String? detail = null) #
Returns: Phases

Adds a phase or updates its status.

Parameters

key System.String requiredposition: 0
Unique key (also the label when label is null).
status ConsoleMonster.Styling.StatusKind = Pending optionalposition: 1
Status.
label System.String? = null optionalposition: 2
Label (markup), or null.
detail System.String? = null optionalposition: 3
Detail (duration, percentage), or null.

Returns

This instance.

Properties

public IReadOnlyList<StatusItem> Items { get; } #

The phases in order.