Skip to content
ConsoleMonster

API Reference

Class

TerminalScope

Namespace ConsoleMonster.Live
Assembly ConsoleMonster
Modifiers static

Ambient progress reporting that flows with the asynchronous execution context.

Inheritance

  • Object
  • TerminalScope

Methods

public static Void Advance(Double amount = 1) #
Returns: Void

Advances the ambient item.

Parameters

amount System.Double = 1 optionalposition: 0
Increment, default one.
public static IDisposable Begin(ILiveDispatcher dispatcher, String target, String? key = null) #
Returns: IDisposable

Begins a scope. Dispose it in the same execution context to restore the previous scope.

Parameters

dispatcher ConsoleMonster.Live.ILiveDispatcher requiredposition: 0
Event destination.
target System.String requiredposition: 1
Target name.
key System.String? = null optionalposition: 2
Optional item key.

Returns

The scope lifetime.

public static Void Log(String text, String level = "info") #
Returns: Void

Writes to the ambient dispatcher's log target.

Parameters

text System.String requiredposition: 0
Log line.
level System.String = "info" optionalposition: 1
Log level.
public static Void Report(String text) #
Returns: Void

Reports detail to the ambient item.

Parameters

text System.String requiredposition: 0
Detail text.
public static Void SetState(String state, String? text = null) #
Returns: Void

Changes the ambient item's state.

Parameters

state System.String requiredposition: 0
State word.
text System.String? = null optionalposition: 1
Optional detail.

Properties

public static Boolean IsActive { get; } #

Whether the current execution context has a progress scope.

public static String? Target { get; } #

The ambient target, or null outside a scope.

public static String? Key { get; } #

The ambient item key, or null when unset.