Skip to content
ConsoleMonster
Class

TerminalChildOptions

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Modifiers
sealed

A child process launched on a real PTY/ConPTY while an application suspends its screen.

Inheritance

  • object
  • TerminalChildOptions

Usage

Explore 21 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.

Accepted by parameters 11

Constructors

public TerminalChildOptions() #

Properties

public string? FileName { get; set; } #

Executable to launch, or null for the platform shell.

public IList<string> Arguments { get; } #

Separate arguments, quoted by the existing terminal transport.

public string WorkingDirectory { get; set; } #

The child's current directory.

public IDictionary<string, string?> Environment { get; } #

Environment overrides passed only to the child.

public TimeSpan Timeout { get; set; } #

Maximum child lifetime. Cancellation terminates this owned child and restores the app.

Extension Methods

public static TerminalChildOptions AddArgument(TerminalChildOptions terminalChildOptions, string item) #

Adds an item to TerminalChildOptions.Arguments: Separate arguments, quoted by the existing terminal transport.

Parameters

terminalChildOptions ConsoleMonster.Interactive.TerminalChildOptions required
The instance.
item string required
The item.

Returns

TerminalChildOptions The same instance.
AddArguments 2 overloads
public static TerminalChildOptions AddArguments(TerminalChildOptions terminalChildOptions, params string[] items) #

Adds items to TerminalChildOptions.Arguments: Separate arguments, quoted by the existing terminal transport.

Parameters

terminalChildOptions ConsoleMonster.Interactive.TerminalChildOptions required
The instance.
items string[] required
The items, in order.

Returns

TerminalChildOptions The same instance.
public static TerminalChildOptions AddArguments(TerminalChildOptions terminalChildOptions, IEnumerable<string> items) #

Adds items to TerminalChildOptions.Arguments: Separate arguments, quoted by the existing terminal transport.

Parameters

terminalChildOptions ConsoleMonster.Interactive.TerminalChildOptions required
The instance.
items System.Collections.Generic.IEnumerable<string> required
The items, in order.

Returns

TerminalChildOptions The same instance.
public static TerminalChildOptions FileName(TerminalChildOptions terminalChildOptions, string? value) #

Sets TerminalChildOptions.FileName: Executable to launch, or null for the platform shell.

Parameters

terminalChildOptions ConsoleMonster.Interactive.TerminalChildOptions required
The instance.
value string? required
The value.

Returns

TerminalChildOptions The same instance.

Examples

// C# initializer or property                                                        // C# fluent
new global::ConsoleMonster.Interactive.TerminalChildOptions { FileName = value };    Ui.Options<global::ConsoleMonster.Interactive.TerminalChildOptions>().FileName(value);
public static TerminalChildOptions Timeout(TerminalChildOptions terminalChildOptions, TimeSpan value) #

Sets TerminalChildOptions.Timeout: Maximum child lifetime. Cancellation terminates this owned child and restores the app.

Parameters

terminalChildOptions ConsoleMonster.Interactive.TerminalChildOptions required
The instance.
value System.TimeSpan required
The value.

Returns

TerminalChildOptions The same instance.

Examples

// C# initializer or property                                                       // C# fluent
new global::ConsoleMonster.Interactive.TerminalChildOptions { Timeout = value };    Ui.Options<global::ConsoleMonster.Interactive.TerminalChildOptions>().Timeout(value);
public static TerminalChildOptions WorkingDirectory(TerminalChildOptions terminalChildOptions, string value) #

Sets TerminalChildOptions.WorkingDirectory: The child's current directory.

Parameters

terminalChildOptions ConsoleMonster.Interactive.TerminalChildOptions required
The instance.
value string required
The value.

Returns

TerminalChildOptions The same instance.

Examples

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