Skip to content
ConsoleMonster

API Reference

Class

StatusKinds

Namespace ConsoleMonster.Styling
Assembly ConsoleMonster
Modifiers static

Helpers for StatusKind: theme token mapping and lenient parsing.

Inheritance

  • Object
  • StatusKinds

Methods

public static String ToEnglishWord(StatusKind status) #
Returns: String

The English status word (PASS, FAIL...), for logs and machine-read output.

Parameters

status ConsoleMonster.Styling.StatusKind requiredposition: 0
The status.

Returns

The word.

public static ThemeToken ToToken(StatusKind status) #
Returns: ThemeToken

Returns the theme token that colours a status.

Parameters

status ConsoleMonster.Styling.StatusKind requiredposition: 0
The status.

Returns

The token.

public static String ToWord(StatusKind status) #
Returns: String

A 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 requiredposition: 0
The status.

Returns

The word.

public static Boolean TryParse(String? text, out StatusKind status) #
Returns: Boolean

Parses 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? requiredposition: 0
The word.
status ConsoleMonster.Styling.StatusKind requiredposition: 1
The status.

Returns

Whether the word was recognised.

Properties

public static IReadOnlyList<String> Words { get; } #

The words StatusKinds.TryParse accepts, for argument completion: the canonical names first, then PowerShell's words.