Skip to content
ConsoleMonster
Class

RunView

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Implements
IWidget
Modifiers
sealed

The live view of a RunTracker: a summary line (done of total, percentage, time left, counts), one cell per item in an active window, the running items with their elapsed time, and the first failures with their messages. Each frame draws a fresh snapshot, so the run can be updated from any thread.

Inheritance

  • object
  • RunView

Usage

Explore 28 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.

Accepted by parameters 14

Constructors

public RunView(RunTracker tracker) #

Creates the view.

Parameters

tracker ConsoleMonster.Live.RunTracker required
The run.

Methods

public IWidget Build(RunSnapshot snapshot, RenderContext context) #

The widgets for one snapshot.

Parameters

snapshot ConsoleMonster.Live.RunSnapshot required
The snapshot.
context ConsoleMonster.Canvas.RenderContext required
The render context.

Returns

IWidget The view.
public Size Measure(Constraints constraints, RenderContext context) #

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints required
The space offered.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Returns

Size The desired size, never larger than the constraints.
public 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 required
The target region.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Properties

public string? Title { get; set; } #

A title above the summary line (markup), or null.

public int MaxRunning { get; set; } #

The most running items listed (default 8); more are counted.

public int MaxFailures { get; set; } #

The most failures listed while the run goes on (default 3); more are counted.

public int MaxFailuresWhenDone { get; set; } #

The most failures listed once the run has finished (default 10, never fewer than RunView.MaxFailures): the final frame stays in the scrollback.

public int MaxListWidth { get; set; } #

The widest the running items' list gets (default 72), so their times stay next to their names on wide terminals.

public int MaxCellRows { get; set; } #

The most rows of item cells (default 4).

public int RetryCount { get; set; } #

The retries allowed per item, for the "retry n of m" note on a running retry; zero shows only the attempt.

Extension Methods

public static RunView MaxCellRows(RunView runView, int value) #

Sets RunView.MaxCellRows: The most rows of item cells (default 4).

Parameters

runView ConsoleMonster.Widgets.RunView required
The instance.
value int required
The value.

Returns

RunView The same instance.

Examples

// C# initializer or property    // C# fluent
runView.MaxCellRows = value;     runView.MaxCellRows(value);
public static RunView MaxFailures(RunView runView, int value) #

Sets RunView.MaxFailures: The most failures listed while the run goes on (default 3); more are counted.

Parameters

runView ConsoleMonster.Widgets.RunView required
The instance.
value int required
The value.

Returns

RunView The same instance.

Examples

// C# initializer or property    // C# fluent
runView.MaxFailures = value;     runView.MaxFailures(value);
public static RunView MaxFailuresWhenDone(RunView runView, int value) #

Sets RunView.MaxFailuresWhenDone: The most failures listed once the run has finished (default 10, never fewer than RunView.MaxFailures): the final frame stays in the scrollback.

Parameters

runView ConsoleMonster.Widgets.RunView required
The instance.
value int required
The value.

Returns

RunView The same instance.

Examples

// C# initializer or property           // C# fluent
runView.MaxFailuresWhenDone = value;    runView.MaxFailuresWhenDone(value);
public static RunView MaxListWidth(RunView runView, int value) #

Sets RunView.MaxListWidth: The widest the running items' list gets (default 72), so their times stay next to their names on wide terminals.

Parameters

runView ConsoleMonster.Widgets.RunView required
The instance.
value int required
The value.

Returns

RunView The same instance.

Examples

// C# initializer or property    // C# fluent
runView.MaxListWidth = value;    runView.MaxListWidth(value);
public static RunView MaxRunning(RunView runView, int value) #

Sets RunView.MaxRunning: The most running items listed (default 8); more are counted.

Parameters

runView ConsoleMonster.Widgets.RunView required
The instance.
value int required
The value.

Returns

RunView The same instance.

Examples

// C# initializer or property    // C# fluent
runView.MaxRunning = value;      runView.MaxRunning(value);
public static RunView RetryCount(RunView runView, int value) #

Sets RunView.RetryCount: The retries allowed per item, for the "retry n of m" note on a running retry; zero shows only the attempt.

Parameters

runView ConsoleMonster.Widgets.RunView required
The instance.
value int required
The value.

Returns

RunView The same instance.

Examples

// C# initializer or property    // C# fluent
runView.RetryCount = value;      runView.RetryCount(value);
public static RunView Title(RunView runView, string? value) #

Sets RunView.Title: A title above the summary line (markup), or null.

Parameters

runView ConsoleMonster.Widgets.RunView required
The instance.
value string? required
The value.

Returns

RunView The same instance.

Examples

// C# initializer or property    // C# fluent
runView.Title = value;           runView.Title(value);