Skip to content
ConsoleMonster

API Reference

Class

ReviewModel

Namespace ConsoleMonster.Interactive
Assembly ConsoleMonster
Modifiers sealed

What a review item shows: the app's current choices as label/value rows, the equivalent command line, problems that block running, and the run action. Built fresh each time the review is drawn, so it always matches the choices.

Inheritance

  • Object
  • ReviewModel

Usage

Explore 4 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 3

Accepted by parameters 1

Constructors

public ReviewModel(String? title = null) #

Creates a review.

Parameters

title System.String? = null optionalposition: 0
A heading, or null for the item title.

Methods

Problem 2 overloads
public ReviewModel Problem(String problem) #
Returns: ReviewModel

Adds a problem that blocks running.

Parameters

problem System.String requiredposition: 0
The problem.

Returns

The review.

public ReviewModel Problem(String problem, MenuItem? fix) #
Returns: ReviewModel

Adds a problem that blocks running and the item that fixes it: Enter on the dimmed Run button opens that item (for example the Targets list when no target is picked).

Parameters

problem System.String requiredposition: 0
The problem.
fix ConsoleMonster.Interactive.MenuItem? requiredposition: 1
The item to open, or null.

Returns

The review.

public ReviewModel Row(String label, String? value) #
Returns: ReviewModel

Adds a row.

Parameters

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

Returns

The review.

Properties

public String? Title { get; set; } #

A heading.

public String? Description { get; set; } #

A sentence under the heading.

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

The choices as label/value rows.

public String? Command { get; set; } #

The equivalent command line, or null.

public IList<String> Problems { get; } #

Problems that block running ("Pick at least one target").

public Action<MenuContext>? Run { get; set; } #

The run action.

public String? RunText { get; set; } #

The caption of the run button; null uses "Run".

public IDictionary<String, MenuItem> Fixes { get; } #

The item that fixes each problem, by problem text.