Skip to content
ConsoleMonster
Class

StatusPresenter

ConsoleMonster.Presenters

Namespace
ConsoleMonster.Presenters
Assembly
ConsoleMonster
Implements
ICellPresenter
Modifiers
sealed

A status as symbol, word and tone: ✓ PASS, ✗ FAIL, ▲ WARN; [FAIL] on the ASCII tier. Accepts StatusKind values and status words (pass, passed, ok, fail, failed, error, warn, warning, skip...). Values that are not statuses are shown as text.

Inheritance

  • object
  • StatusPresenter

Constructors

public StatusPresenter(bool showWord = true) #

Creates a status presenter.

Parameters

showWord bool = true optional
Whether the word follows the symbol (default true).

Methods

public PresentedValue Present(object? value, PresenterContext context) #

Presents a value.

Parameters

value object? required
The raw value (may be null).
context ConsoleMonster.Presenters.PresenterContext required
Culture, clock, time zone, column statistics and the render context.

Returns

PresentedValue The presented value.

Properties

public bool ShowWord { get; } #

Whether the word follows the symbol.