API Reference
InteractiveOptions
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 49 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 8
- Property ChangePreviewOptions.Interactive
- Property FormOptions.Interactive
- Property GridOptions.Interactive
- Method InteractiveOptions.Clone
- Property InteractiveOptions.Default
- Property MenuOptions.Interactive
- Property ReplayOptions.Interactive
- Method TestTerminal.Interactive
Accepted by parameters 41
- Method ConfirmPrompt.Show
- Method ConfirmPrompt.ShowAsync
- Method ConfirmPrompt.TryShow
- Method MultiSelectPrompt.Show
- Method MultiSelectPrompt.ShowAsync
- Method MultiSelectPrompt.TryShow
- Method NumberPrompt.Show
- Method NumberPrompt.ShowAsync
- Method NumberPrompt.TryShow
- Method PathPrompt.Show
- Method PathPrompt.ShowAsync
- 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.SelectAsync``1
- Method Prompt.Select``1
- Method Prompt.Text
- Method Prompt.TypedConfirm
- Method Prompt.Show
- Method Prompt.ShowAsync
- Method Prompt.TryShow
- Method SecretPrompt.Show
- Method SecretPrompt.ShowAsync
- Method SecretPrompt.TryShow
- Method SelectPrompt.Show
- Method SelectPrompt.ShowAsync
- Method SelectPrompt.TryShow
- Method TextAreaPrompt.Show
- Method TextAreaPrompt.ShowAsync
- Method TextAreaPrompt.TryShow
- Method TextPrompt.Show
- Method TextPrompt.ShowAsync
- Method TextPrompt.TryShow
- Method TypedConfirmPrompt.Show
- Method TypedConfirmPrompt.ShowAsync
- Method TypedConfirmPrompt.TryShow
Constructors
public InteractiveOptions() #Methods
public InteractionMode ResolveMode() #InteractionModePicks the interaction mode: an explicit InteractiveOptions.Mode wins; 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.
Returns
The mode.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
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 Boolean NonInteractive { get; set; } #Treats the session as non-interactive (PowerShell's -NonInteractive): prompts use defaults or fail.
public IInputSource? Input { get; set; } #An input source instead of the console (a script in tests and demos).
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 Int32? 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.