Skip to content
ConsoleMonster

API Reference

Class

RunResult

Namespace ConsoleMonster.Interactive
Assembly ConsoleMonster
Modifiers sealed

The outcome of a run, shown by the menu afterwards: a status, a summary, key figures, details and next actions.

Inheritance

  • Object
  • RunResult

Usage

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

Constructors

public RunResult(String title, StatusKind status = Pass) #

Creates a result.

Parameters

title System.String requiredposition: 0
The title ("Checks finished").
status ConsoleMonster.Styling.StatusKind = Pass optionalposition: 1
The status.

Methods

Figure 2 overloads
public RunResult Figure(String label, String value) #
Returns: RunResult

Adds a key figure.

Parameters

label System.String requiredposition: 0
The label.
value System.String requiredposition: 1
The value.

Returns

The result.

public RunResult Figure(String label, String value, StatusKind status) #
Returns: RunResult

Adds a key figure whose number carries a status colour (use it only for figures that need attention).

Parameters

label System.String requiredposition: 0
The label.
value System.String requiredposition: 1
The value.
status ConsoleMonster.Styling.StatusKind requiredposition: 2
The status.

Returns

The result.

public RunResult Next(String title, Action<MenuContext> action) #
Returns: RunResult

Adds a next action.

Parameters

title System.String requiredposition: 0
The title.
action System.Action<ConsoleMonster.Interactive.MenuContext> requiredposition: 1
The action.

Returns

The result.

Properties

public String Title { get; set; } #

The title.

public StatusKind Status { get; set; } #

The status.

public String? Summary { get; set; } #

A sentence under the title.

public IList<KeyValuePair<String, String>> Figures { get; } #

Key figures shown as label/value pairs ("Passed" = "41").

public IDictionary<String, StatusKind> FigureStatus { get; } #

The status of each figure that has one (its number is coloured), by label.

public IWidget? Details { get; set; } #

Detail content under the figures (a table, a list).

public IList<MenuItem> NextActions { get; } #

Actions offered next ("Open report", "Run failed again", "Export").

public TimeSpan Elapsed { get; set; } #

How long the run took.

public Exception? Error { get; set; } #

The exception that ended the run, if any.