Skip to content
ConsoleMonster

API Reference

Class

BooleanPresenter

Namespace ConsoleMonster.Presenters
Assembly ConsoleMonster
Implements
Modifiers sealed

A boolean as symbol and word: ✓ yes / – no (yes / no on the ASCII tier). True takes the pass tone and false is muted, unless the presenter is created as a problem flag (true is bad).

Inheritance

  • Object
  • BooleanPresenter

Constructors

public BooleanPresenter(String trueText = "yes", String falseText = "no", Boolean trueIsProblem = false) #

Creates a boolean presenter.

Parameters

trueText System.String = "yes" optionalposition: 0
The word for true (default yes).
falseText System.String = "no" optionalposition: 1
The word for false (default no).
trueIsProblem System.Boolean = false optionalposition: 2
Whether true is a problem (for example PasswordNeverExpires): true takes the warning tone.

Methods

public PresentedValue Present(Object? value, PresenterContext context) #
Returns: PresentedValue

Presents a value.

Parameters

value System.Object? requiredposition: 0
The raw value (may be null).
context ConsoleMonster.Presenters.PresenterContext requiredposition: 1
Culture, clock, time zone, column statistics and the render context.

Returns

The presented value.

Properties

public String TrueText { get; } #

The word for true.

public String FalseText { get; } #

The word for false.

public Boolean TrueIsProblem { get; } #

Whether true is a problem.