ConfirmAsync(IAnsiConsole, string, bool, CancellationToken) Method

Displays a prompt with two choices, yes or no.
public static Task<bool> ConfirmAsync(this IAnsiConsole console, string prompt, bool defaultValue = true, CancellationToken cancellationToken = default(CancellationToken))
Namespace
Spectre.Console
Containing Type
AnsiConsoleExtensions

Parameters

IAnsiConsole console
The console.
string prompt
The prompt markup text.
bool defaultValue
Specifies the default answer.
CancellationToken cancellationToken
The token to monitor for cancellation requests.

Returns

Task<bool>