Skip to content
ConsoleMonster

API Reference

Class

LiveEvent

Namespace ConsoleMonster.Live
Assembly ConsoleMonster
Modifiers sealed

One update for a live widget, addressed by the widget's name. Every live change travels as a LiveEvent, so updates from any thread can be queued, coalesced, recorded as JSON lines and replayed without reflection.

Inheritance

  • Object
  • LiveEvent

Usage

Explore 52 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 50

Constructors

public LiveEvent(String target, String operation, String? key = null, String? text = null, String? state = null, Double value = 0, Double total = 0, Int64 time = 0, Boolean isMarkup = false) #

Creates an event.

Parameters

target System.String requiredposition: 0
The name of the target widget.
operation System.String requiredposition: 1
The operation, defined by the target (for example advance, add, write).
key System.String? = null optionalposition: 2
The item key inside the target (lane, phase, row), when the operation needs one.
text System.String? = null optionalposition: 3
Free text (log line, detail, label).
state System.String? = null optionalposition: 4
A state word (pass, fail, running, info, warn...).
value System.Double = 0 optionalposition: 5
A numeric value (increment, sample, current value).
total System.Double = 0 optionalposition: 6
A second numeric value (maximum, total, duration).
time System.Int64 = 0 optionalposition: 7
Milliseconds since the session started; the session stamps it when 0.
isMarkup System.Boolean = false optionalposition: 8
Whether text is markup (rich text) rather than literal text.

Methods

public override String ToString() #
Returns: String

Returns a string that represents the current object.

Returns

A string that represents the current object.

public LiveEvent WithTime(Int64 time) #
Returns: LiveEvent

Returns a copy stamped with a time.

Parameters

time System.Int64 requiredposition: 0
Milliseconds since the session started.

Returns

The stamped event.

Properties

public Boolean IsMarkup { get; } #

Whether LiveEvent.Text is markup (rich text, for example from New-ConsoleText) rather than literal text. Targets that show text literally (lane labels and detail, log lines) render it with its styles when set.

public String Target { get; } #

The name of the target widget.

public String Operation { get; } #

The operation.

public String? Key { get; } #

The item key inside the target.

public String? Text { get; } #

Free text.

public String? State { get; } #

A state word.

public Double Value { get; } #

A numeric value.

public Double Total { get; } #

A second numeric value.

public Int64 Time { get; } #

Milliseconds since the session started.

public Object? Payload { get; set; } #

An in-process object for the target (a replacement widget for a Slot, row values for a LiveTable), or null. It is not recorded: a replayed recording sees only the text fields.