Table of Contents

Class CommandRouter

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

The default ICommandRouter.

public sealed class CommandRouter : ICommandRouter
Inheritance
CommandRouter
Implements
Inherited Members

Constructors

CommandRouter(TerminalOptions, ILicenseExtractor, ICommandParser, ICommandHandler, ILogger<CommandRouter>, ITerminalEventHandler?)

Initializes a new instance.

public CommandRouter(TerminalOptions terminalOptions, ILicenseExtractor licenseExtractor, ICommandParser commandParser, ICommandHandler commandHandler, ILogger<CommandRouter> logger, ITerminalEventHandler? asyncEventHandler = null)

Parameters

terminalOptions TerminalOptions

The configuration options.

licenseExtractor ILicenseExtractor

The license extractor.

commandParser ICommandParser

The command parser.

commandHandler ICommandHandler

The command handler.

logger ILogger<CommandRouter>

The logger.

asyncEventHandler ITerminalEventHandler

The event handler.

Methods

RouteCommandAsync(CommandRouterContext)

Routes the command request to the registered handler.

public Task<CommandRouterResult> RouteCommandAsync(CommandRouterContext context)

Parameters

context CommandRouterContext

The router context.

Returns

Task<CommandRouterResult>

The CommandRouterResult instance.