Class ConsoleInputSource
Console input source - reads from actual console (production). Abstract base class for platform-specific implementations.
public abstract class ConsoleInputSource : IInputSource
- Inheritance
-
ConsoleInputSource
- Implements
- Inherited Members
Constructors
- ConsoleInputSource(ITimeProvider)
Initializes a new instance of the ConsoleInputSource class.
Fields
- _inputBuffer
Input buffer populated by the background read thread.
Properties
- IsAvailable
Check if input is available without consuming it.
- TimeProvider
Time provider for timestamps and timing.
Methods
- ReadAvailable()
Reads all available input synchronously. Called by InputProcessor on the main loop thread.
- ReadLoop(CancellationToken)
Platform-specific implementation of reading input. Runs on background thread, enqueues to InputBuffer.
- Start(CancellationToken)
Starts background input reading (for production implementations). Test implementations typically don't need this.
- Stop()
Stops background input reading.