Class ConsoleInput<T>
Base class for reading console input in perpetual loop
public abstract class ConsoleInput<T> : IConsoleInput<T>, IDisposable
Type Parameters
T
- Inheritance
-
ConsoleInput<T>
- Implements
- Derived
- Inherited Members
Properties
- Now
Determines how to get the current system type, adjust in unit tests to simulate specific timings.
Methods
- Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
- Initialize(ConcurrentQueue<T>)
Initializes the input with a buffer into which to put data read
- Peek()
When implemented in a derived class, returns true if there is data available to read from console.
- Run(CancellationToken)
Runs in an infinite input loop.