ReadKeyAsync(bool, CancellationToken) Method
Reads a key from the console.
public Task<ConsoleKeyInfo?> ReadKeyAsync(bool intercept, CancellationToken cancellationToken)
- Namespace
- Spectre
.Console .Testing - Containing Type
- TestConsoleInput
Parameters
- bool intercept
- Whether or not to intercept the key.
- CancellationToken cancellationToken
- The token to monitor for cancellation requests.
Returns
-
Task
< Console Key Info?>