Stateful, instance-based terminal API. The static Terminal facade forwards to a single global instance.
[NullableContext((byte)1)]
[Nullable((byte)0)]
public sealed class TerminalInstance : IDisposable
kind:method, kind:property, kind:ctor. Press Esc to clear.BufferHeightGets or sets the buffer height in character cells (best effort).CursorTopGets or sets the 0-based cursor row (best effort).DecorationsGets or sets the current decoration flags (best effort).ForegroundColorGets or sets the current foreground color (best effort).InGets a TextReader that reads from terminal input.IsInitializedGets a value indicating whether this instance has been initialized with a backend.IsInputRunningGets a value indicating whether the input loop is currently running.IsInteractiveGets a value indicating whether the terminal appears interactive (not redirected).KeyAvailableGets a value indicating whether a key event is available on the default input stream.LargestWindowHeightGets the largest supported window height in character cells (best effort).OptionsGets the options used by this terminal instance.OutGets a serialized TextWriter for terminal standard output.StyleGets or sets the current text style (best effort).WindowGets window and buffer size operations.WindowHeightGets or sets the window height in character cells (best effort).Background(AnsiColor)Emits an SGR sequence that sets the background color.Beep()Emits an audible beep (best effort).CaptureOutput(AnsiBuilder)Captures all terminal output performed on the current thread into the provided AnsiBuilder.Clear(TerminalClearKind)Clears the terminal (best effort).Dispose()Disposes this terminal instance and its backend (best effort).EnableBracketedPaste()Enables bracketed paste within a scope and restores the previous state when disposed (best effort).EnableMouse(TerminalMouseMode)Enables mouse reporting within a scope and restores the previous state when disposed (best effort).GetBufferSize()Gets the current buffer size in character cells (best effort).GetCursorPosition()Gets the cursor position (0-based).MeasureStyledWidth(String)Measures the visible width of a string that contains ANSI escape sequences or XenoAtom markup.ReadKey(Boolean)Reads the next key from the default input stream.ReadKeyAsync(Boolean, CancellationToken)Reads the next key from the default input stream.ReadLine(TerminalReadLineOptions?)Reads a line of text from the terminal using terminal input events.RemoveMarkupStyle(String)Removes a custom markup style token and invalidates cached markup renderers.ResetStyle()Emits SGR reset (ESC [ 0 m).SetCursorPosition(TerminalPosition)Sets the cursor position (0-based, best effort).SetCursorVisible(Boolean)Sets the cursor visibility (best effort).SetWindowSize(TerminalSize)Sets the window size in character cells (best effort).StopInputAsync(CancellationToken)Stops the input loop and disposes any input resources (idempotent).StyleTransition(AnsiStyle, AnsiStyle)Emits a minimal SGR sequence that transitions from one style to another.TryGetCursorPosition(out TerminalPosition)Tries to get the cursor position (0-based).TryReadEvent(out TerminalEvent)Tries to read a single event without awaiting.UseAlternateScreen()Enables the alternate screen buffer within a scope and restores the previous state when disposed (best effort).UseCursorPosition(TerminalPosition)Sets the cursor position and restores the previous position when disposed (best effort).UseTitle(String)Sets the terminal title within a scope and restores the previous title when disposed (best effort).Write(ReadOnlySpan<Char>)Writes text to the terminal output.WriteAtomic(Action<AnsiWriter>)Ensures multiple ANSI writes are not interleaved with other terminal output.WriteErrorAtomic(Action<TextWriter>)Ensures multiple text writes to standard error are not interleaved with other terminal output.WriteLine(ReadOnlySpan<Char>)Writes text followed by a line terminator.WriteMarkup(ReadOnlySpan<Char>)Writes markup text using AnsiMarkup.WriteMarkupLine(String)Writes markup text followed by a line terminator.