Docs / MonoInput

Glossary: ActiveInputs<TStatus>

The members of ActiveInputs, in alphabetical order.

Color legend plain property method

A live, read-only view of a list of active inputs: what ActiveKeys and ActiveNotes are.

A sealed class, in the namespace BorrowedTorch.MonoInput.Inputs, that implements IReadOnlyCollection<TStatus>. It has no public constructor: the keyboard and MIDI managers create one each, for the whole run. It shows the list as it is now, and its manager’s Update adds, moves and removes the statuses in it. The button states page shows it in context, with code.

A foreach over it takes the list’s own struct enumerator and doesn’t allocate. LINQ, and any other code that goes through IEnumerable<TStatus>, boxes that enumerator and allocates.

Names are colored by what they are: a property or a method; values and fields keep the plain color.

Properties

Count →

int · Read-only. How many inputs are active: pressed, held or just let go.

Methods

GetEnumerator() →

GetEnumerator() · Returns LinkedList<TStatus>.Enumerator, a struct, over the statuses in the order their inputs were first pressed. foreach calls it. Like any list enumerator, it throws InvalidOperationException when its manager’s Update runs in the middle of the loop.