RunDashboardSection
ConsoleMonster.Widgets
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.
Returned or exposed by 5
- Property RunDashboard.Sections
- Extension method RunDashboardSection.MaxHeight
- Extension method RunDashboardSection.Priority
- Method RunDashboardSectionFluent.MaxHeight
- Method RunDashboardSectionFluent.Priority
Accepted by parameters 8
- Extension method RunDashboard.Section
- Extension method RunDashboard.Sections
- Method RunDashboardFluent.Section
- Method RunDashboardFluent.Sections
- Extension method RunDashboardSection.MaxHeight
- Extension method RunDashboardSection.Priority
- Method RunDashboardSectionFluent.MaxHeight
- Method RunDashboardSectionFluent.Priority
Constructors
public RunDashboardSection(string title, IWidget content) #Creates a section that shows a widget the host keeps up to date.
Parameters
- title string
- The literal title, or an empty string for none.
- content ConsoleMonster.Layout.IWidget
- 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
- The literal title, or an empty string for none.
- build System.Func<ConsoleMonster.Live.RunSnapshot, ConsoleMonster.Layout.IWidget>
- Builds the widget from the snapshot the frame draws.
Inherited Methods
Properties
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
- The instance.
- value int
- The value.
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
- The instance.
- value int
- The value.
Examples
// C# initializer or property // C# fluent
runDashboardSection.Priority = value; runDashboardSection.Priority(value);