Table of Contents

Class MainLoop<T>

Namespace
Terminal.Gui
Assembly
Terminal.Gui.dll

Supports all classes in the .NET class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all .NET classes; it is the root of the type hierarchy.

public class MainLoop<T> : IMainLoop<T>, IDisposable

Type Parameters

T
Inheritance
MainLoop<T>
Implements
Inherited Members

Fields

ToplevelTransitionManager

Handles raising events and setting required draw status etc when Top changes

Properties

AnsiRequestScheduler

Gets the class responsible for sending ANSI escape requests which expect a response from the remote terminal e.g. Device Attribute Request

InputBuffer

The input events thread-safe collection. This is populated on separate thread by a IConsoleInput<T>. Is drained as part of each Iteration()

InputProcessor

Gets the class responsible for processing buffered console input and translating it into events on the UI thread.

Now

Determines how to get the current system type, adjust in unit tests to simulate specific timings.

Out

Class for writing output to the console.

OutputBuffer

Gets the class responsible for writing final rendered output to the console

TimedEvents

Gets the class responsible for servicing user timeouts and idles

WindowSizeMonitor

Gets the class responsible for determining the current console size

Methods

Dispose()

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Initialize(ITimedEvents, ConcurrentQueue<T>, IInputProcessor, IConsoleOutput)

Initializes the class with the provided subcomponents

Iteration()

Perform a single iteration of the main loop then blocks for a fixed length of time, this method is designed to be run in a loop.