namespace Spectre.Console; /// /// Represents the console's input mechanism. /// public interface IAnsiConsoleInput { /// /// Gets a value indicating whether or not /// there is a key available. /// /// true if there's a key available, otherwise false. bool IsKeyAvailable(); /// /// Reads a key from the console. /// /// Whether or not to intercept the key. /// The key that was read. ConsoleKeyInfo? ReadKey(bool intercept); /// /// Reads a key from the console. /// /// Whether or not to intercept the key. /// The token to monitor for cancellation requests. /// The key that was read. Task ReadKeyAsync(bool intercept, CancellationToken cancellationToken); }