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