Skip to content
ConsoleMonster
Class

InteractiveOptionsFluent

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
static
Attributes
GeneratedCode("ConsoleMonster.Generators", "1.0.0")

The fluent methods of InteractiveOptions, generated from its public properties: A property-named method sets a property and Add... adds to a collection, both returning the same instance.

Inheritance

  • object
  • InteractiveOptionsFluent

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 required
The instance.
value ConsoleMonster.Interactive.ScreenCapture? required
The value.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                     // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Capture = value };    Ui.Options<global::ConsoleMonster.Interactive.InteractiveOptions>().Capture(value);
public static InteractiveOptions Configure(InteractiveOptions interactiveOptions, Action<InteractiveOptions> configure) #

Assigns callbacks and related configuration without invoking delegate-valued properties.

Parameters

interactiveOptions ConsoleMonster.Interactive.InteractiveOptions required
The instance.
configure System.Action<ConsoleMonster.Interactive.InteractiveOptions> required
Assignments applied in order.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                         // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { ActionClock = value };    Ui.Options<global::ConsoleMonster.Interactive.InteractiveOptions>().Configure(configured => configured.ActionClock = 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 required
The instance.
value ConsoleMonster.Input.IInputSource? required
The value.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Input = value };    Ui.Options<global::ConsoleMonster.Interactive.InteractiveOptions>().Input(value);
Labels 2 overloads
public static InteractiveOptions Labels(InteractiveOptions interactiveOptions, PromptLabels? value) #

Sets InteractiveOptions.Labels: The built-in words; null uses PromptLabels.Default.

Parameters

interactiveOptions ConsoleMonster.Interactive.InteractiveOptions required
The instance.
value ConsoleMonster.Interactive.PromptLabels? required
The value.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                    // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Labels = value };    Ui.Options<global::ConsoleMonster.Interactive.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 required
The instance.
configure System.Action<ConsoleMonster.Interactive.PromptLabels> required
Configures the value.

Returns

InteractiveOptions The same instance.
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 required
The instance.
value ConsoleMonster.Interactive.ILineConsole? required
The value.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                         // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { LineConsole = value };    Ui.Options<global::ConsoleMonster.Interactive.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 required
The instance.
value int? required
The value.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                             // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { MaxInlineHeight = value };    Ui.Options<global::ConsoleMonster.Interactive.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 required
The instance.
value ConsoleMonster.Interactive.InteractionMode? required
The value.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                  // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Mode = value };    Ui.Options<global::ConsoleMonster.Interactive.InteractiveOptions>().Mode(value);
NonInteractive 2 overloads
public static InteractiveOptions NonInteractive(InteractiveOptions interactiveOptions, bool value) #

Sets InteractiveOptions.NonInteractive: Treats the session as non-interactive (PowerShell's -NonInteractive): prompts use defaults or fail.

Parameters

interactiveOptions ConsoleMonster.Interactive.InteractiveOptions required
The instance.
value bool required
The value.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                            // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { NonInteractive = value };    Ui.Options<global::ConsoleMonster.Interactive.InteractiveOptions>().NonInteractive(value);
public static InteractiveOptions NonInteractive(InteractiveOptions interactiveOptions) #

Sets InteractiveOptions.NonInteractive to true.

Parameters

interactiveOptions ConsoleMonster.Interactive.InteractiveOptions required
The instance to configure.

Returns

InteractiveOptions The same instance.
public static InteractiveOptions Profile(InteractiveOptions interactiveOptions, TerminalProfile? value) #

Sets InteractiveOptions.Profile: The terminal profile; null uses Terminal.GetCurrentProfile.

Parameters

interactiveOptions ConsoleMonster.Interactive.InteractiveOptions required
The instance.
value ConsoleMonster.Capabilities.TerminalProfile? required
The value.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                     // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Profile = value };    Ui.Options<global::ConsoleMonster.Interactive.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 required
The instance.
value ConsoleMonster.Output.ITerminalTarget? required
The value.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                    // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Target = value };    Ui.Options<global::ConsoleMonster.Interactive.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 required
The instance.
value ConsoleMonster.Styling.ITheme? required
The value.

Returns

InteractiveOptions The same instance.

Examples

// C# initializer or property                                                   // C# fluent
new global::ConsoleMonster.Interactive.InteractiveOptions { Theme = value };    Ui.Options<global::ConsoleMonster.Interactive.InteractiveOptions>().Theme(value);