Skip to content
ConsoleMonster

API Reference

Class

StreamTerminalWriter

Namespace ConsoleMonster.Output
Assembly ConsoleMonster
Implements
ITerminalWriter IDisposable
Modifiers sealed

Writes UTF-8 (without BOM) to a stream, typically redirected standard output. Text is buffered until StreamTerminalWriter.Flush so a frame or block reaches the device in one write.

Inheritance

  • Object
  • StreamTerminalWriter

Usage

Explore 1 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 1

Constructors

public StreamTerminalWriter(Stream stream, Boolean ownsStream = false) #

Creates a writer over a stream.

Parameters

stream System.IO.Stream requiredposition: 0
The stream.
ownsStream System.Boolean = false optionalposition: 1
Whether disposing the writer disposes the stream.

Methods

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 static StreamTerminalWriter ForStandardOutput() #
Returns: StreamTerminalWriter

Creates a writer over the process's real standard output (not Console.Out).

Returns

The writer.

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).