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