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