Table of Contents

Class CommandContext

Namespace
OneImlx.Terminal.Commands
Assembly
OneImlx.Terminal.dll

The generic command router context.

public sealed class CommandContext
Inheritance
CommandContext
Inherited Members

Constructors

CommandContext(TerminalRequest, TerminalRouterContext, Dictionary<string, object>?)

The command string.

public CommandContext(TerminalRequest request, TerminalRouterContext context, Dictionary<string, object>? properties)

Parameters

request TerminalRequest

The request to process.

context TerminalRouterContext

The terminal routing context.

properties Dictionary<string, object>

The additional router properties.

Properties

License

The extracted license.

public License? License { get; }

Property Value

License

ParsedCommand

The parsed command.

public ParsedCommand? ParsedCommand { get; }

Property Value

ParsedCommand

Properties

The additional router properties.

public Dictionary<string, object>? Properties { get; }

Property Value

Dictionary<string, object>

Request

The terminal request.

public TerminalRequest Request { get; }

Property Value

TerminalRequest

Result

The result of the command execution.

public CommandResult? Result { get; }

Property Value

CommandResult

TerminalContext

The terminal routing context.

public TerminalRouterContext TerminalContext { get; }

Property Value

TerminalRouterContext

Methods

EnsureCommand()

Ensures the command is available.

public Command EnsureCommand()

Returns

Command

The available command.

Exceptions

TerminalException

Thrown when the parsed command is not available.

EnsureLicense()

Ensures the license is available.

public License EnsureLicense()

Returns

License

The available license.

Exceptions

TerminalException

Thrown when the license is not available.

EnsureParsedCommand()

Ensures the parsed command is available.

public ParsedCommand EnsureParsedCommand()

Returns

ParsedCommand

The available parsed command.

Exceptions

TerminalException

Thrown when the parsed command is not available.

EnsureResult()

Ensures the result is available.

public CommandResult EnsureResult()

Returns

CommandResult

The available result.

Exceptions

TerminalException

Thrown when the result is not available.