IAnsiConsoleInput Interface

Represents the console's input mechanism.
public interface IAnsiConsoleInput
Namespace
Spectre.Console
Implementing Types

Methods

abstract bool IsKeyAvailable()
Gets a value indicating whether or not there is a key available.
abstract ConsoleKeyInfo? ReadKey(bool)
Reads a key from the console.
abstract Task<ConsoleKeyInfo?> ReadKeyAsync(bool, CancellationToken)
Reads a key from the console.

Extension Methods

T And<IAnsiConsoleInput>(Action<IAnsiConsoleInput>)
Performs the specified action on the given object and then returns the object. Useful for fluent testing patterns where additional assertions or operations are chained together in a readable manner.