Skip to content
ConsoleMonster

API Reference

Class

StatusLine

Namespace ConsoleMonster.Output
Assembly ConsoleMonster
Modifiers sealed

A single updating status line on a real VT console (Write-ConsoleStatus in PowerShell): redrawn in place (carriage return, the line, clear to the end), with an optional spinner, clock and elapsed time refreshed about ten times a second. The refresh stops by itself as soon as anything else moves the cursor (other output, the prompt), so it never draws over later output; completing the status ends the line.

Inheritance

  • Object
  • StatusLine

Methods

public static StyledLine Compose(RenderContext context, RichText content, StatusKind? status, Boolean spinner, Boolean clock, Boolean elapsed, String clockFormat, DateTime started, Int64 frame, Boolean final) #
Returns: StyledLine

Builds the status line text for a context: spinner or status marker, clock, elapsed time, then the content.

Parameters

context ConsoleMonster.Canvas.RenderContext requiredposition: 0
The render context.
content ConsoleMonster.Text.RichText requiredposition: 1
The text after the marker.
status ConsoleMonster.Styling.StatusKind? requiredposition: 2
A status marker instead of the spinner, or null.
spinner System.Boolean requiredposition: 3
Whether to show the spinner.
clock System.Boolean requiredposition: 4
Whether the time of day leads the line.
elapsed System.Boolean requiredposition: 5
Whether the elapsed time follows the content.
clockFormat System.String requiredposition: 6
The time format for the clock.
started System.DateTime requiredposition: 7
When the status started (for the elapsed time).
frame System.Int64 requiredposition: 8
The animation frame (spinner position).
final System.Boolean requiredposition: 9
Whether the line is complete (no spinner).

Returns

The line.

public static Void Show(TerminalProfile profile, RichText content, StatusKind? status, Boolean spinner, Boolean clock, Boolean elapsed, String clockFormat, Boolean final) #
Returns: Void

Shows or updates the status line; with final the line is completed.

Parameters

profile ConsoleMonster.Capabilities.TerminalProfile requiredposition: 0
The console profile.
content ConsoleMonster.Text.RichText requiredposition: 1
The text after the marker.
status ConsoleMonster.Styling.StatusKind? requiredposition: 2
A status marker instead of the spinner, or null.
spinner System.Boolean requiredposition: 3
Whether a spinner turns until the line completes.
clock System.Boolean requiredposition: 4
Whether the time of day leads the line.
elapsed System.Boolean requiredposition: 5
Whether the elapsed time follows the content.
clockFormat System.String requiredposition: 6
The time format for the clock.
final System.Boolean requiredposition: 7
Whether the line completes (the next output starts below it).