Class
StatusLine
ConsoleMonster.Output
A single updating status line on a real VT console (Show-ConsoleStatusLine 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, bool spinner, bool showTimestamp, bool showElapsed, string timestampFormat, DateTime started, long frame, bool final) #Builds the status line text for a context: spinner or status marker, clock, elapsed time, then the content.
Parameters
- context ConsoleMonster.Canvas.RenderContext
- The render context.
- content ConsoleMonster.Text.RichText
- The text after the marker.
- status ConsoleMonster.Styling.StatusKind?
- A status marker instead of the spinner, or null.
- spinner bool
- Whether to show the spinner.
- showTimestamp bool
- Whether the time of day leads the line.
- showElapsed bool
- Whether the elapsed time follows the content.
- timestampFormat string
- The time format for the clock.
- started System.DateTime
- When the status started (for the elapsed time).
- frame long
- The animation frame (spinner position).
- final bool
- Whether the line is complete (no spinner).
public static void Show(TerminalProfile profile, RichText content, StatusKind? status, bool spinner, bool showTimestamp, bool showElapsed, string timestampFormat, bool final) #Shows or updates the status line; with final the line is completed.
Parameters
- profile ConsoleMonster.Capabilities.TerminalProfile
- The console profile.
- content ConsoleMonster.Text.RichText
- The text after the marker.
- status ConsoleMonster.Styling.StatusKind?
- A status marker instead of the spinner, or null.
- spinner bool
- Whether a spinner turns until the line completes.
- showTimestamp bool
- Whether the time of day leads the line.
- showElapsed bool
- Whether the elapsed time follows the content.
- timestampFormat string
- The time format for the clock.
- final bool
- Whether the line completes (the next output starts below it).