Class
KeyValueItem
ConsoleMonster.Widgets
One pair in a KeyValueList.
Inheritance
- object
- KeyValueItem
Usage
Explore 3 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
- Method KeyValueItem.ForValue
- Property KeyValueList.Items
Accepted by parameters 1
- Method KeyValueList.Add
Constructors
public KeyValueItem(string key, string value, StatusKind? status = null) #Creates a pair.
Parameters
- key string
- The key (plain text).
- value string
- The value (markup).
- status ConsoleMonster.Styling.StatusKind? = null
- An optional status marker.
Methods
public static KeyValueItem ForValue(string key, object? value, ICellPresenter? presenter = null, StatusKind? status = null) #Creates a pair whose value is formatted by a presenter (sizes, durations, dates, statuses...).
Parameters
- key string
- The key (plain text).
- value object?
- The raw value.
- presenter ConsoleMonster.Presenters.ICellPresenter? = null
- The presenter, or null for the one the key and value suggest.
- status ConsoleMonster.Styling.StatusKind? = null
- An optional status marker.
Inherited Methods
Properties
public TableCell? Cell { get; internal set; } #A raw value shown through KeyValueItem.Presenter instead of KeyValueItem.Value, or null.
public ICellPresenter? Presenter { get; internal set; } #The presenter for KeyValueItem.Cell, or null for automatic.
public IReadOnlyList<RoleRule>? Rules { get; internal set; } #Tone rules for KeyValueItem.Cell, or null.