Skip to content
ConsoleMonster
Class

Meter

ConsoleMonster.Frames

Namespace
ConsoleMonster.Frames
Assembly
ConsoleMonster
Modifiers
sealed

A headline tile under the title line: a label, then a value with a bar or a short fact. Meters are declared in priority order: one line holds as many tiles as the width allows and lower-priority meters are left out on narrower terminals. Meters summarise; every problem they count must also be in the attention list.

Inheritance

  • object
  • Meter

Usage

Explore 10 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 6

Accepted by parameters 4

Methods

public static Meter Composition(string label, long healthy, long warning = 0, long failing = 0, long unknown = 0, long notEvaluated = 0) #

A composition: healthy out of the total, with the problem shares in their roles. A fully healthy meter is quiet.

Parameters

label string required
The literal label.
healthy long required
Healthy items.
warning long = 0 optional
Warnings.
failing long = 0 optional
Failing items.
unknown long = 0 optional
Items without a value.
notEvaluated long = 0 optional
Items that could not be evaluated.

Returns

Meter The meter.
public static Meter Count(string label, long value, string? fact = null, HealthState state = Healthy) #

A count with an optional Muted fact (12 all on CORP-DC03).

Parameters

label string required
The literal label.
value long required
The count.
fact string? = null optional
A literal fact.
state ConsoleMonster.Frames.HealthState = Healthy optional
The value's state.

Returns

Meter The meter.
public static Meter Fact(string label, string value, string? fact = null, HealthState state = Healthy) #

A literal value with an optional Muted fact (2d 4h CORP-DC03 ← CORP-DC05).

Parameters

label string required
The literal label.
value string required
The literal value.
fact string? = null optional
A literal fact.
state ConsoleMonster.Frames.HealthState = Healthy optional
The value's state.

Returns

Meter The meter.
public static Meter Missing(string label, string? reason = null) #

A meter whose value was not reported. It shows ◌ unknown, never zero.

Parameters

label string required
The literal label.
reason string? = null optional
An optional literal reason.

Returns

Meter The meter.
public static Meter Ratio(string label, long healthy, long whole, HealthState rest = Failing) #

A healthy part of a whole; the rest is drawn in the state the data owner gives it.

Parameters

label string required
The literal label.
healthy long required
The healthy part.
whole long required
The whole.
rest ConsoleMonster.Frames.HealthState = Failing optional
The state of the remainder, for example HealthState.NotEvaluated for targets that did not answer.

Returns

Meter The meter.