PromptAsync<T>(IAnsiConsole, IPrompt<T>, CancellationToken) Method
Displays a prompt to the user.
public static Task<T> PromptAsync<T>(this IAnsiConsole console, IPrompt<T> prompt, CancellationToken cancellationToken = default(CancellationToken))
- Namespace
- Spectre
.Console - Containing Type
- Ansi
Console Extensions
Parameters
-
T
- The prompt result type.
Parameters
- IAnsiConsole console
- The console.
-
IPrompt
<T> prompt - The prompt to display.
- CancellationToken cancellationToken
- The token to monitor for cancellation requests.
Returns
-
Task
<T>