Class
ConsoleApp
ConsoleMonster.Interactive
Runs reactive input widgets in an ordinary layout, with callbacks on the input thread and live cell diffing.
Inheritance
- object
- ConsoleApp
Methods
public static AppState Run(IWidget layout, AppState? state = null, ConsoleAppOptions? options = null, CancellationToken cancellationToken = default) #Runs until Escape, input completion, cancellation or a requested exit, and returns the final state.
Parameters
- layout ConsoleMonster.Layout.IWidget
- A layout containing named inputs and dependent display bindings.
- state ConsoleMonster.Interactive.AppState? = null
- Shared values, or null to create an empty state.
- options ConsoleMonster.Interactive.ConsoleAppOptions? = null
- Input and rendering configuration.
- cancellationToken System.Threading.CancellationToken = default
- Cancels input and restores the terminal before returning control.
Exceptions
PromptUnavailableException– Interactive input is unavailable and a static snapshot was not requested.OperationCanceledException– Cancellation was requested.ArgumentException– Inline live mode was requested; interactive apps require a stable full-screen origin.
public static Task<AppState> RunAsync(IWidget layout, AppState? state = null, ConsoleAppOptions? options = null, CancellationToken cancellationToken = default) #Runs the same input loop on a worker thread, preserving callback and input-lease thread affinity.
Parameters
- layout ConsoleMonster.Layout.IWidget
- The layout.
- state ConsoleMonster.Interactive.AppState? = null
- Shared values, or null.
- options ConsoleMonster.Interactive.ConsoleAppOptions? = null
- Input and rendering options.
- cancellationToken System.Threading.CancellationToken = default
- Cancels the application.