ReadKeyAsync(bool, CancellationToken) Method

Reads a key from the console.
public Task<ConsoleKeyInfo?> ReadKeyAsync(bool intercept, CancellationToken cancellationToken)
Containing Type
TestConsoleInput

Parameters

bool intercept
Whether or not to intercept the key.
CancellationToken cancellationToken
The token to monitor for cancellation requests.

Returns

Task<ConsoleKeyInfo?>