InteractiveOptions
ConsoleMonster.Interactive
Settings shared by prompts, menus and forms: how to interact (detected by default), where input comes from, the terminal profile, theme and labels. Every property is optional.
Inheritance
- object
- InteractiveOptions
Usage
Explore 141 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 31
- Property ChangePreviewOptions.Interactive
- Property ConsoleAppOptions.Interactive
- Property FormOptions.Interactive
- Property GridOptions.Interactive
- Extension method InteractiveOptions.Capture
- Extension method InteractiveOptions.Input
- Extension method InteractiveOptions.Labels
- Extension method InteractiveOptions.LineConsole
- Extension method InteractiveOptions.MaxInlineHeight
- Extension method InteractiveOptions.Mode
- Extension method InteractiveOptions.Mouse
- Extension method InteractiveOptions.NonInteractive
- Extension method InteractiveOptions.Profile
- Extension method InteractiveOptions.Target
- Extension method InteractiveOptions.Theme
- Method InteractiveOptions.Clone
- Property InteractiveOptions.Default
- Method InteractiveOptionsFluent.Capture
- Method InteractiveOptionsFluent.Input
- Method InteractiveOptionsFluent.Labels
- Method InteractiveOptionsFluent.LineConsole
- Method InteractiveOptionsFluent.MaxInlineHeight
- Method InteractiveOptionsFluent.Mode
- Method InteractiveOptionsFluent.Mouse
- Method InteractiveOptionsFluent.NonInteractive
- Method InteractiveOptionsFluent.Profile
- Method InteractiveOptionsFluent.Target
- Method InteractiveOptionsFluent.Theme
- Property MenuOptions.Interactive
- Property ReplayOptions.Interactive
- Method TestTerminal.Interactive
Accepted by parameters 110
- Extension method ChangePreviewOptions.Interactive
- Extension method ChangePreviewOptions.Interactive
- Method ChangePreviewOptionsFluent.Interactive
- Method ChangePreviewOptionsFluent.Interactive
- Method ConfirmPrompt.Show
- Method ConfirmPrompt.ShowAsync
- Method ConfirmPrompt.Snapshot
- Method ConfirmPrompt.TryShow
- Extension method ConsoleAppOptions.Interactive
- Extension method ConsoleAppOptions.Interactive
- Method ConsoleAppOptionsFluent.Interactive
- Method ConsoleAppOptionsFluent.Interactive
- Method DatePrompt.Show
- Method DatePrompt.ShowAsync
- Method DatePrompt.Snapshot
- Method DatePrompt.TryShow
- Extension method FormOptions.Interactive
- Extension method FormOptions.Interactive
- Method FormOptionsFluent.Interactive
- Method FormOptionsFluent.Interactive
- Extension method GridOptions.Interactive
- Extension method GridOptions.Interactive
- Method GridOptionsFluent.Interactive
- Method GridOptionsFluent.Interactive
- Extension method InteractiveOptions.Capture
- Extension method InteractiveOptions.Input
- Extension method InteractiveOptions.Labels
- Extension method InteractiveOptions.LineConsole
- Extension method InteractiveOptions.MaxInlineHeight
- Extension method InteractiveOptions.Mode
- Extension method InteractiveOptions.Mouse
- Extension method InteractiveOptions.NonInteractive
- Extension method InteractiveOptions.Profile
- Extension method InteractiveOptions.Target
- Extension method InteractiveOptions.Theme
- Method InteractiveOptionsFluent.Capture
- Method InteractiveOptionsFluent.Input
- Method InteractiveOptionsFluent.Labels
- Method InteractiveOptionsFluent.LineConsole
- Method InteractiveOptionsFluent.MaxInlineHeight
- Method InteractiveOptionsFluent.Mode
- Method InteractiveOptionsFluent.Mouse
- Method InteractiveOptionsFluent.NonInteractive
- Method InteractiveOptionsFluent.Profile
- Method InteractiveOptionsFluent.Target
- Method InteractiveOptionsFluent.Theme
- Extension method MenuOptions.Interactive
- Extension method MenuOptions.Interactive
- Method MenuOptionsFluent.Interactive
- Method MenuOptionsFluent.Interactive
- Method MultiSelectPrompt<T>.Show
- Method MultiSelectPrompt<T>.ShowAsync
- Method MultiSelectPrompt<T>.Snapshot
- Method MultiSelectPrompt<T>.TryShow
- Method NumberPrompt.Show
- Method NumberPrompt.ShowAsync
- Method NumberPrompt.Snapshot
- Method NumberPrompt.TryShow
- Method ObjectExplorer.Show
- Method PathPrompt.Show
- Method PathPrompt.ShowAsync
- Method PathPrompt.Snapshot
- Method PathPrompt.TryShow
- Method Prompt.Confirm
- Method Prompt.ConfirmAsync
- Method Prompt.Integer
- Method Prompt.MultiSelect``1
- Method Prompt.Number
- Method Prompt.Path
- Method Prompt.Secret
- Method Prompt.SecureSecret
- Method Prompt.SelectAsync``1
- Method Prompt.Select``1
- Method Prompt.Text
- Method Prompt.TypedConfirm
- Method Prompt<T>.Show
- Method Prompt<T>.ShowAsync
- Method Prompt<T>.Snapshot
- Method Prompt<T>.TryShow
- Method SecretPrompt.Show
- Method SecretPrompt.ShowAsync
- Method SecretPrompt.ShowSecure
- Method SecretPrompt.Snapshot
- Method SecretPrompt.TryShow
- Method SelectionQuestion.Show
- Method SelectionQuestion.Snapshot
- Method SelectPrompt<T>.Show
- Method SelectPrompt<T>.ShowAsync
- Method SelectPrompt<T>.Snapshot
- Method SelectPrompt<T>.TryShow
- Extension method SelectQuestionOptions.Show
- Extension method SelectQuestionOptions.ShowMany``1
- Extension method SelectQuestionOptions.Show``1
- Method TextPrompt.Show
- Method TextPrompt.ShowAsync
- Method TextPrompt.Snapshot
- Method TextPrompt.TryShow
- Extension method TextQuestionOptions.Show
- Method TypedConfirmPrompt.Show
- Method TypedConfirmPrompt.ShowAsync
- Method TypedConfirmPrompt.Snapshot
- Method TypedConfirmPrompt.TryShow
- Method WidgetPager.TryShow
- Extension method ReplayOptions.Interactive
- Extension method ReplayOptions.Interactive
- Method ReplayOptionsFluent.Interactive
- Method ReplayOptionsFluent.Interactive
- Method UiConstruction.Show
- Method UiConstruction.ShowMany``1
- Method UiConstruction.Show``1
Constructors
public InteractiveOptions() #Methods
public InteractiveOptions Clone() #Returns a copy.
public InteractionMode ResolveMode() #Picks the interaction mode: snapshot and non-interactive guards apply first; accessible environment/defaults precede a requested rich mode; then non-interactive sessions (the InteractiveOptions.NonInteractive flag, CONSOLEMONSTER_NONINTERACTIVE=1, CI, redirected input without an input source) get InteractionMode.None; CONSOLEMONSTER_ACCESSIBLE=1 gets InteractionMode.Accessible; consoles without VT get InteractionMode.Line; everything else InteractionMode.Rich.
Inherited Methods
Properties
public static InteractiveOptions Default { get; set; } #Process-wide defaults used when a prompt gets no options.
public InteractionMode? Mode { get; set; } #Forces an interaction mode; null detects it (see InteractiveOptions.ResolveMode).
public bool NonInteractive { get; set; } #Treats the session as non-interactive (PowerShell's -NonInteractive): prompts use defaults or fail.
public bool Mouse { get; set; } #Whether prompts, menus, pagers and apps take mouse input where the terminal reports it (default true). False, or CONSOLEMONSTER_NOMOUSE=1, leaves the mouse to the terminal (selection, scrollback); every action keeps its key.
public IInputSource? Input { get; set; } #An input source instead of the console (a script in tests and demos).
public Func<TimeSpan>? ActionClock { get; set; } #NoFluentOptional monotonic clock for grid and app action-log timestamps, relative to each action's start. Null uses real elapsed time. Simulations and capture recipes can supply a thread-safe clock such as SimulatedClock.Read; the action worker may sample it from another thread. This does not replace action delays, cancellation, or input pacing.
public TerminalProfile? Profile { get; set; } #The terminal profile; null uses Terminal.GetCurrentProfile.
public PromptLabels? Labels { get; set; } #The built-in words; null uses PromptLabels.Default.
public ILineConsole? LineConsole { get; set; } #Line input and output for the line-based and accessible modes; null uses the console.
public int? MaxInlineHeight { get; set; } #The most rows an inline prompt may take (default: the window height minus two, at most 20).
public ScreenCapture? Capture { get; set; } #Where prompts draw in InteractionMode.Rich mode (tests use a recording surface). Null picks the right one: inline below the cursor, or an overlay over a running live dashboard.
public ITerminalTarget? Target { get; set; } #Where the prompt runs (see ITerminalTarget), or null for Terminal.Target. A target other than the console supplies the input (null input: nobody can answer, so defaults apply), the profile, and for a RecordingTarget the screen capture. InteractiveOptions.Input, InteractiveOptions.Profile and InteractiveOptions.Capture still win when set.
Extension Methods
public static InteractiveOptions Capture(InteractiveOptions interactiveOptions, ScreenCapture? value) #Sets InteractiveOptions.Capture: Where prompts draw in InteractionMode.Rich mode (tests use a recording surface). Null picks the right one: inline below the cursor, or an overlay over a running live dashboard.
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value ConsoleMonster.Interactive.ScreenCapture?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Capture = value }; interactiveOptions.Capture(value);public static InteractiveOptions Input(InteractiveOptions interactiveOptions, IInputSource? value) #Sets InteractiveOptions.Input: An input source instead of the console (a script in tests and demos).
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value ConsoleMonster.Input.IInputSource?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Input = value }; interactiveOptions.Input(value);public static InteractiveOptions Labels(InteractiveOptions interactiveOptions, PromptLabels? value) #Sets InteractiveOptions.Labels: The built-in words; null uses PromptLabels.Default.
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value ConsoleMonster.Interactive.PromptLabels?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Labels = value }; interactiveOptions.Labels(value);public static InteractiveOptions Labels(InteractiveOptions interactiveOptions, Action<PromptLabels> configure) #Configures InteractiveOptions.Labels in place (creating it when not set): The built-in words; null uses PromptLabels.Default.
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- configure System.Action<ConsoleMonster.Interactive.PromptLabels>
- Configures the value.
public static InteractiveOptions LineConsole(InteractiveOptions interactiveOptions, ILineConsole? value) #Sets InteractiveOptions.LineConsole: Line input and output for the line-based and accessible modes; null uses the console.
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value ConsoleMonster.Interactive.ILineConsole?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { LineConsole = value }; interactiveOptions.LineConsole(value);public static InteractiveOptions MaxInlineHeight(InteractiveOptions interactiveOptions, int? value) #Sets InteractiveOptions.MaxInlineHeight: The most rows an inline prompt may take (default: the window height minus two, at most 20).
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value int?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { MaxInlineHeight = value }; interactiveOptions.MaxInlineHeight(value);public static InteractiveOptions Mode(InteractiveOptions interactiveOptions, InteractionMode? value) #Sets InteractiveOptions.Mode: Forces an interaction mode; null detects it (see InteractiveOptions.ResolveMode).
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value ConsoleMonster.Interactive.InteractionMode?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Mode = value }; interactiveOptions.Mode(value);public static InteractiveOptions Mouse(InteractiveOptions interactiveOptions, bool value = true) #Sets InteractiveOptions.Mouse: Whether prompts, menus, pagers and apps take mouse input where the terminal reports it (default true). False, or CONSOLEMONSTER_NOMOUSE=1, leaves the mouse to the terminal (selection, scrollback); every action keeps its key.
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Mouse = value }; interactiveOptions.Mouse(value);public static InteractiveOptions NonInteractive(InteractiveOptions interactiveOptions, bool value = true) #Sets InteractiveOptions.NonInteractive: Treats the session as non-interactive (PowerShell's -NonInteractive): prompts use defaults or fail.
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value bool = true
- The value; true when omitted.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { NonInteractive = value }; interactiveOptions.NonInteractive(value);public static InteractiveOptions Profile(InteractiveOptions interactiveOptions, TerminalProfile? value) #Sets InteractiveOptions.Profile: The terminal profile; null uses Terminal.GetCurrentProfile.
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value ConsoleMonster.Capabilities.TerminalProfile?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Profile = value }; interactiveOptions.Profile(value);public static InteractiveOptions Target(InteractiveOptions interactiveOptions, ITerminalTarget? value) #Sets InteractiveOptions.Target: Where the prompt runs (see ITerminalTarget), or null for Terminal.Target. A target other than the console supplies the input (null input: nobody can answer, so defaults apply), the profile, and for a RecordingTarget the screen capture. InteractiveOptions.Input, InteractiveOptions.Profile and InteractiveOptions.Capture still win when set.
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value ConsoleMonster.Output.ITerminalTarget?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Target = value }; interactiveOptions.Target(value);public static InteractiveOptions Theme(InteractiveOptions interactiveOptions, ITheme? value) #Sets InteractiveOptions.Theme: The theme; null uses Terminal.Theme.
Parameters
- interactiveOptions ConsoleMonster.Interactive.InteractiveOptions
- The instance.
- value ConsoleMonster.Styling.ITheme?
- The value.
Examples
// C# initializer or property // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Theme = value }; interactiveOptions.Theme(value);