Table of Contents

Class ConsoleRenderer

Namespace
Shard.Logger
Assembly
Shard.Logger.dll

Coordinates all console output with an optional interactive prompt so log lines never garble the input line. Everything written to the terminal (logs, command output, the prompt itself) goes through here under a single lock: when a prompt is active, output erases it, writes, then redraws it, keeping the prompt anchored at the bottom. With no prompt (headless/redirected) output is written directly.

public static class ConsoleRenderer
Inheritance
ConsoleRenderer
Inherited Members

Properties

Gate

The shared output lock; the interactive prompt holds it while editing its line.

public static object Gate { get; }

Property Value

object

Methods

SetPrompt(IPromptController?)

Register (or clear with null) the active interactive prompt.

public static void SetPrompt(IPromptController? prompt)

Parameters

prompt IPromptController

WriteLine(string)

Write a plain (escaped) line, coordinated with the active prompt.

public static void WriteLine(string text)

Parameters

text string

WriteMarkup(string)

Write a Spectre markup line, coordinated with the active prompt.

public static void WriteMarkup(string markup)

Parameters

markup string