Skip to content
ConsoleMonster
Class

RunDashboardSection

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Modifiers
sealed

A section a host adds to a RunDashboard (any widget under a title), such as a score so far or a distribution of findings. The dashboard fits it into its height with its own parts by RunDashboardSection.Priority: when the height runs out, lower priorities shrink first and then drop out.

Inheritance

  • object
  • RunDashboardSection

Usage

Explore 13 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 8

Constructors

RunDashboardSection 2 overloads
public RunDashboardSection(string title, IWidget content) #

Creates a section that shows a widget the host keeps up to date.

Parameters

title string required
The literal title, or an empty string for none.
content ConsoleMonster.Layout.IWidget required
The widget.
public RunDashboardSection(string title, Func<RunSnapshot, IWidget> build) #

Creates a section built for each frame from the run's state.

Parameters

title string required
The literal title, or an empty string for none.
build System.Func<ConsoleMonster.Live.RunSnapshot, ConsoleMonster.Layout.IWidget> required
Builds the widget from the snapshot the frame draws.

Properties

public string Title { get; } #

The literal title.

public int Priority { get; set; } #

How much the section matters next to the dashboard's own parts (default 50). The dashboard keeps the running work (90) and the category map (70) before a default section, and the group rows (30) and queued work (20) after it.

public int MaxHeight { get; set; } #

The most rows the section's content takes (default 0: as many as it measures).

public IWidget? Content { get; } #

The widget a static section shows, or null for one built per frame.

Extension Methods

public static RunDashboardSection MaxHeight(RunDashboardSection runDashboardSection, int value) #

Sets RunDashboardSection.MaxHeight: The most rows the section's content takes (default 0: as many as it measures).

Parameters

runDashboardSection ConsoleMonster.Widgets.RunDashboardSection required
The instance.
value int required
The value.

Returns

RunDashboardSection The same instance.

Examples

// C# initializer or property             // C# fluent
runDashboardSection.MaxHeight = value;    runDashboardSection.MaxHeight(value);
public static RunDashboardSection Priority(RunDashboardSection runDashboardSection, int value) #

Sets RunDashboardSection.Priority: How much the section matters next to the dashboard's own parts (default 50). The dashboard keeps the running work (90) and the category map (70) before a default section, and the group rows (30) and queued work (20) after it.

Parameters

runDashboardSection ConsoleMonster.Widgets.RunDashboardSection required
The instance.
value int required
The value.

Returns

RunDashboardSection The same instance.

Examples

// C# initializer or property            // C# fluent
runDashboardSection.Priority = value;    runDashboardSection.Priority(value);