Skip to content
ConsoleMonster

API Reference

Class

ConfirmPrompt

Namespace ConsoleMonster.Interactive
Assembly ConsoleMonster
Base Prompt<Boolean>
Modifiers sealed

A yes/no question with the default shown: ? Continue? [ Yes ] No. Y and N answer at once, arrows move between the answers, Enter takes the focused one, Esc answers no.

Inheritance

  • Prompt<Boolean>
  • ConfirmPrompt

Constructors

ConfirmPrompt 2 overloads
public ConfirmPrompt(String title) #

Creates a confirmation.

Parameters

title System.String requiredposition: 0
The question.
public ConfirmPrompt(String title, Boolean defaultValue) #

Creates a confirmation with a default.

Parameters

title System.String requiredposition: 0
The question.
defaultValue System.Boolean requiredposition: 1
The default answer.

Methods

public override String Describe(Boolean value) #
Returns: String

The answer as text, for the summary line left in the scrollback.

Parameters

value System.Boolean requiredposition: 0
The answer.

Returns

The text.

Properties

public Boolean Destructive { get; set; } #

Marks the question as destructive: a warning mark, and No is focused unless the default says otherwise.

public String? YesText { get; set; } #

The caption of the positive answer; null uses the labels.

public String? NoText { get; set; } #

The caption of the negative answer; null uses the labels.