Skip to content
ConsoleMonster
Class

TableCell

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Modifiers
sealed

A table cell: either markup text (optionally with a status marker), or a raw value that the column's presenter formats (numbers, bytes, dates, statuses, data bars...). Raw values also feed totals and tone rules.

Inheritance

  • object
  • TableCell

Usage

Explore 21 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.

Accepted by parameters 10

Constructors

public TableCell(string markup) #

Creates a cell from markup.

Parameters

markup string required
The markup.

Methods

public static TableCell ForSeverity(Severity severity, string? text = null) #

Creates a severity cell whose glyph is chosen before destination measurement.

Parameters

severity ConsoleMonster.Styling.Severity required
text string? = null optional

Returns

TableCell
public static TableCell ForStatus(StatusKind status, string? text = null) #

Creates a status cell: the marker and the text take the status colour; this is the row's one colour signal.

Parameters

status ConsoleMonster.Styling.StatusKind required
The status.
text string? = null optional
The text (plain), or null for the status word.

Returns

TableCell The cell.
public static TableCell FromValue(object? value) #

Creates a value cell: the column's presenter formats it, and totals and tone rules read it.

Parameters

value object? required
The raw value; null and System.Reflection.Missing.Value use a muted placeholder, and an empty string stays blank.

Returns

TableCell The cell.
public static TableCell op_Implicit(string markup) #

Converts a string (markup) to a cell.

Parameters

markup string required
The markup.

Returns

TableCell
public TableCell WithTone(Tone tone) #

Returns a copy with a cell tone, retaining the raw value, status and existing emphasis.

Parameters

tone ConsoleMonster.Tone required
The theme role supplied by the caller; it is not inferred from the numeric value.

Returns

TableCell A new cell; this cell is unchanged.

Properties

public string Markup { get; } #

The markup (empty for value cells).

public StatusKind? Status { get; private set; } #

The status, when this is a status cell.

public Severity? AssessmentSeverity { get; private set; } #

The assessment severity when this cell uses the assessment scale.

public object? Value { get; } #

The raw value of a value cell, or null.

public bool HasValue { get; } #

Whether this is a value cell (formatted by the column's presenter).