Skip to content
ConsoleMonster

API Reference

Class

TypedConfirmPrompt

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

The confirmation for destructive actions: the user types a given text (a name, a domain) before Enter is accepted. Returns true when confirmed and false when the user backs out with Esc.

Inheritance

  • Prompt<Boolean>
  • TypedConfirmPrompt

Constructors

public TypedConfirmPrompt(String title, String expected) #

Creates a typed confirmation.

Parameters

title System.String requiredposition: 0
The question ("Remove 3 servers from the inventory?").
expected System.String requiredposition: 1
The text to type.

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 String Expected { get; } #

The text to type.

public Boolean CaseSensitive { get; set; } #

Whether case must match too.

public String? Warning { get; set; } #

A warning under the question (default: none).