Skip to content
ConsoleMonster
Class

ReplayPlayer

ConsoleMonster.Replay

Namespace
ConsoleMonster.Replay
Assembly
ConsoleMonster
Modifiers
static

Rewinds runs: an in-terminal player for recordings (the JSON-lines files written with LiveSessionOptions.RecordingPath or LiveSessionOptions.AutoRecord). The recording is played into the same dashboard definition, then shown with play/pause, speed, frame stepping, a timeline to scrub, jumps to markers, failures, warnings and log entries, and a search over the log. Without an interactive console it prints the markers as lines instead.

Inheritance

  • object
  • ReplayPlayer

Methods

public static string FormatTime(TimeSpan time) #

Formats a timeline position as m:ss.f (or h:mm:ss past an hour).

Parameters

time System.TimeSpan required
The position.

Returns

string The text.
Play 2 overloads
public static void Play(IWidget root, TextReader jsonLines, ReplayOptions? options = null, CancellationToken cancellationToken = default) #

Plays a recording.

Parameters

root ConsoleMonster.Layout.IWidget required
The dashboard (or any widget tree) whose widget names match the recording.
jsonLines System.IO.TextReader required
The recording.
options ConsoleMonster.Replay.ReplayOptions? = null optional
Options, or null.
cancellationToken System.Threading.CancellationToken = default optional
Ends the player.
public static void Play(IWidget root, IReadOnlyList<LiveEvent> events, ReplayOptions? options = null, CancellationToken cancellationToken = default) #

Plays recorded events.

Parameters

root ConsoleMonster.Layout.IWidget required
The dashboard (or any widget tree) whose widget names match the recording.
events System.Collections.Generic.IReadOnlyList<ConsoleMonster.Live.LiveEvent> required
The events in recording order.
options ConsoleMonster.Replay.ReplayOptions? = null optional
Options, or null.
cancellationToken System.Threading.CancellationToken = default optional
Ends the player.