Skip to content
ConsoleMonster

API Reference

Class

LineOutput

Namespace ConsoleMonster.Rendering
Assembly ConsoleMonster
Implements
ITerminalOutput IDisposable
Modifiers sealed

The line-based output for OutputMode.Stream and OutputMode.Plain: append-only lines, never any cursor movement. Stream keeps colour when the profile allows it (CI logs render ANSI); Plain never emits escape sequences. Live frames are ignored: a live session narrates events as lines instead.

Inheritance

  • Object
  • LineOutput

Constructors

public LineOutput(ITerminalWriter writer, TerminalProfile profile, Boolean ownsWriter = true) #

Creates a line output.

Parameters

writer ConsoleMonster.Output.ITerminalWriter requiredposition: 0
The sink.
profile ConsoleMonster.Capabilities.TerminalProfile requiredposition: 1
The profile.
ownsWriter System.Boolean = true optionalposition: 2
Whether disposing this output disposes the writer.

Methods

public Void BeginLive() #
Returns: Void

Starts live rendering (VT: alternate screen, hidden cursor). No effect for line-based outputs.

public Void Dispose() #
Returns: Void

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

public Void EndLive() #
Returns: Void

Ends live rendering and restores the terminal (cursor, screen, attributes). Safe to call more than once.

public Void Invalidate() #
Returns: Void

Forces the next frame to be redrawn completely (after a resize or external output).

public Void RenderFrame(CellBuffer frame) #
Returns: Void

Draws a full-screen frame, writing only the cells that changed since the previous frame.

Parameters

frame ConsoleMonster.Canvas.CellBuffer requiredposition: 0
The frame; its size is the screen size.
public Void WriteBlock(CellBuffer buffer) #
Returns: Void

Appends a rendered block (print-once output) to the scrollback.

Parameters

buffer ConsoleMonster.Canvas.CellBuffer requiredposition: 0
The rendered block; trailing blank cells on each row are trimmed.
public Void WriteInline(StyledLine line) #
Returns: Void

Writes one styled line without ending it (Write-ConsoleText -NoNewLine); the next write continues on it.

Parameters

line ConsoleMonster.Text.StyledLine requiredposition: 0
The line.
public Void WriteLine(StyledLine line) #
Returns: Void

Appends one styled line (stream narration, captured output, summaries).

Parameters

line ConsoleMonster.Text.StyledLine requiredposition: 0
The line.

Properties

public TerminalProfile Profile { get; } #

The profile this output encodes for.

public Boolean SupportsLiveFrames { get; } #

Whether the output can redraw a live frame in place.