Skip to content
ConsoleMonster

API Reference

Class

StringTerminalWriter

Namespace ConsoleMonster.Output
Assembly ConsoleMonster
Implements
ITerminalWriter IDisposable
Modifiers sealed

An in-memory ITerminalWriter. Used by tests (VT byte-stream goldens) and by callers that want rendered output as a string, for example to embed it in another log.

Inheritance

  • Object
  • StringTerminalWriter

Constructors

public StringTerminalWriter() #

Methods

public Void Clear() #
Returns: Void

Clears the accumulated text.

public Void Dispose() #
Returns: Void

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

public Void Flush() #
Returns: Void

Flushes buffered text to the device.

public override String ToString() #
Returns: String

Returns everything written so far.

Returns

The accumulated text.

public Void Write(String text) #
Returns: Void

Writes text. Implementations may buffer until ITerminalWriter.Flush.

Parameters

text System.String requiredposition: 0
Text, possibly containing VT sequences.

Properties

public Boolean IsConsole { get; } #

Whether this writer targets a real console handle (as opposed to a file, pipe or buffer).

public Int32 FlushCount { get; private set; } #

Number of StringTerminalWriter.Flush calls; a live renderer flushes once per frame.