API Reference
Class
StatusEnumPresenter
Enum and text values that read as a status (Running, Stopped, Healthy, Failed, Degraded...) shown with a status marker and colour, keeping the value's own word: ✓ Running, ○ Stopped, ✗ Failed. Words it does not know show as plain text.
Inheritance
- Object
- StatusEnumPresenter
Constructors
public StatusEnumPresenter() #Methods
public static Boolean LooksLikeStatus(Type type) #Returns:
BooleanWhether an enum type reads as a status: at least one of its names is a known status word.
Parameters
- type System.Type
- The enum type.
Returns
True when it looks like a status.
public PresentedValue Present(Object? value, PresenterContext context) #Returns:
PresentedValuePresents a value.
Parameters
- value System.Object?
- The raw value (may be null).
- context ConsoleMonster.Presenters.PresenterContext
- Culture, clock, time zone, column statistics and the render context.
Returns
The presented value.
public static Boolean TryRead(String? word, out StatusKind status) #Returns:
BooleanWhether a word reads as a status.
Parameters
- word System.String?
- The word (an enum name or text).
- status ConsoleMonster.Styling.StatusKind
- The status it reads as.
Returns
True when known.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?