Table of Contents

Class FakeInput

Namespace
Terminal.Gui.Drivers
Assembly
Terminal.Gui.dll

IInput<TInputRecord> implementation that uses a fake input source for testing. The Peek() and Read() methods are executed on the input thread created by StartInputTaskAsync(IApplication).

public class FakeInput : InputImpl<ConsoleKeyInfo>, ITestableInput<ConsoleKeyInfo>, IInput<ConsoleKeyInfo>, IDisposable
Inheritance
FakeInput
Implements
Inherited Members

Constructors

FakeInput()

Creates a new FakeInput.

Methods

AddInput(ConsoleKeyInfo)

Adds an input record that will be returned by Peek/Read for testing.

Peek()

When implemented in a derived class, returns true if there is data available to read from console.

Read()

Returns the available data without blocking, called when Peek() returns true.