Table of Contents

Class TerminalConsoleRouterContext

Namespace
OneImlx.Terminal.Runtime
Assembly
OneImlx.Terminal.dll
public sealed class TerminalConsoleRouterContext : TerminalRouterContext
Inheritance
TerminalConsoleRouterContext
Inherited Members

Constructors

TerminalConsoleRouterContext(TerminalStartMode, bool?, Dictionary<string, object>?, string[]?)

Initializes a new instance of TerminalConsoleRouterContext.

public TerminalConsoleRouterContext(TerminalStartMode startMode, bool? routeOnce = null, Dictionary<string, object>? customProperties = null, string[]? arguments = null)

Parameters

startMode TerminalStartMode

The terminal start mode.

routeOnce bool?

Determines whether the router will route the request only once.

customProperties Dictionary<string, object>

The custom properties.

arguments string[]

The command line arguments.

Properties

RouteOnce

Determines whether the router will route the request only once. When RouteOnce is set to true, the terminal router processes a single incoming request, executes the corresponding command, and then cancels further routing operations.

public bool? RouteOnce { get; }

Property Value

bool?

Remarks

The route-once behavior is useful for scenarios like command-line tools or driver terminal programs where only one execution cycle is required. For example, in a .NET CLI, a command such as dotnet build runs once per invocation when executed from an existing terminal. Similarly, setting RouteOnce to true ensures the router processes one command, completes its task, and exits cleanly. If set to false (or left unset), the router continues processing incoming requests until explicitly canceled or terminated.