Class CommandContext
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
TerminalRequestThe request to process.
context
TerminalRouterContextThe terminal routing context.
properties
Dictionary<string, object>The additional router properties.
Properties
License
The extracted license.
public License? License { get; }
Property Value
ParsedCommand
The parsed command.
public ParsedCommand? ParsedCommand { get; }
Property Value
Properties
The additional router properties.
public Dictionary<string, object>? Properties { get; }
Property Value
Request
The terminal request.
public TerminalRequest Request { get; }
Property Value
Result
The result of the command execution.
public CommandResult? Result { get; }
Property Value
TerminalContext
The terminal routing context.
public TerminalRouterContext TerminalContext { get; }
Property Value
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.