Class
TerminalScope
ConsoleMonster.Live
Ambient progress reporting that flows with the asynchronous execution context.
Inheritance
- object
- TerminalScope
Methods
public static void Advance(double amount = 1) #Advances the ambient item.
Parameters
- amount double = 1
- Increment, default one.
public static IDisposable Begin(ILiveDispatcher dispatcher, string target, string? key = null) #Begins a scope. Dispose it in the same execution context to restore the previous scope.
Parameters
- dispatcher ConsoleMonster.Live.ILiveDispatcher
- Event destination.
- target string
- Target name.
- key string? = null
- Optional item key.
Returns
IDisposable The scope lifetime.public static void Log(string text, string level = "info") #Writes to the ambient dispatcher's log target.
Parameters
- text string
- Log line.
- level string = "info"
- Log level.
public static void Report(string text) #Reports detail to the ambient item.
Parameters
- text string
- Detail text.
public static void SetState(string state, string? text = null) #Changes the ambient item's state.
Parameters
- state string
- State word.
- text string? = null
- Optional detail.