API Reference
WriterTarget
Output to a TextWriter (a log, a StringWriter, a host's output stream) laid out for a chosen width, glyph tier and colour depth: append-only lines, with SGR colour codes only when the depth asks for them. No input.
Inheritance
- Object
- WriterTarget
Constructors
public WriterTarget(TextWriter writer, Int32 width = 80, GlyphTier glyphs = Ascii, ColorDepth colors = None, CultureInfo? culture = null) #Creates a writer target.
Parameters
- writer System.IO.TextWriter
- The writer; the caller keeps ownership.
- width System.Int32 = 80
- Width in cells (default 80).
- glyphs ConsoleMonster.Capabilities.GlyphTier = Ascii
- The glyph tier (default ASCII, safe in any log).
- colors ConsoleMonster.Capabilities.ColorDepth = None
- The colour depth (default none: plain text).
- culture System.Globalization.CultureInfo? = null
- The culture for numbers, dates and built-in labels; null for the current culture.
public WriterTarget(TextWriter writer, TerminalProfile profile) #Creates a writer target with an explicit profile (its mode decides between line output and VT output).
Parameters
- writer System.IO.TextWriter
- The writer; the caller keeps ownership.
- profile ConsoleMonster.Capabilities.TerminalProfile
- The profile.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public String Name { get; } #A short description for diagnostics, for example console or recording 80x24.
public TerminalProfile Profile { get; } #The capability profile for a write happening now (the console's refreshes its size on every call).
public ITheme? Theme { get; set; } #The theme (default the dark theme, so output does not depend on the machine).
public ITerminalWriter? Writer { get; } #The writer that receives the output, or null for the process console. The target owns it: callers write and flush but never dispose it.
public IInputSource? Input { get; } #The input for prompts, menus and forms, or null. On the console null means the keyboard; on any other target it means nobody can answer, so prompts use their defaults or explain what is missing.