API Reference
Class
StatusKinds
Helpers for StatusKind: theme token mapping and lenient parsing.
Inheritance
- Object
- StatusKinds
Methods
public static String ToEnglishWord(StatusKind status) #Returns:
StringThe English status word (PASS, FAIL...), for logs and machine-read output.
Parameters
- status ConsoleMonster.Styling.StatusKind
- The status.
Returns
The word.
public static ThemeToken ToToken(StatusKind status) #Returns:
ThemeTokenReturns the theme token that colours a status.
Parameters
- status ConsoleMonster.Styling.StatusKind
- The status.
Returns
The token.
public static String ToWord(StatusKind status) #Returns:
StringA short upper-case word for a status (PASS, FAIL, WARN, SKIP, RUN, WAIT, INFO in English), in the language of WidgetLabels.Current.
Parameters
- status ConsoleMonster.Styling.StatusKind
- The status.
Returns
The word.
public static Boolean TryParse(String? text, out StatusKind status) #Returns:
BooleanParses a status word leniently, including PowerShell's own words: pass/passed/ok/success/done/completed, fail/failed/failure/error, warn/warning, skip/skipped/na, run/running/active/busy, pending/queued/waiting, info/information/verbose/debug.
Parameters
- text System.String?
- The word.
- status ConsoleMonster.Styling.StatusKind
- The status.
Returns
Whether the word was recognised.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?
Properties
public static IReadOnlyList<String> Words { get; } #The words StatusKinds.TryParse accepts, for argument completion: the canonical names first, then PowerShell's words.