Table of Contents

Class CommandHandler

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

The default handler to handle a command request routed from a CommandRouter.

public sealed class CommandHandler : ICommandHandler
Inheritance
CommandHandler
Implements
Inherited Members

Constructors

CommandHandler(ICommandRuntime, ILicenseChecker, TerminalOptions, ITerminalHelpProvider, ILogger<CommandHandler>)

Initialize a news instance.

public CommandHandler(ICommandRuntime commandRuntime, ILicenseChecker licenseChecker, TerminalOptions options, ITerminalHelpProvider terminalHelpProvider, ILogger<CommandHandler> logger)

Parameters

commandRuntime ICommandRuntime
licenseChecker ILicenseChecker
options TerminalOptions
terminalHelpProvider ITerminalHelpProvider
logger ILogger<CommandHandler>

CommandHandler(ICommandRuntime, ILicenseChecker, TerminalOptions, ITerminalHelpProvider, ITerminalEventHandler?, ILogger<CommandHandler>)

Initialize a news instance.

public CommandHandler(ICommandRuntime commandRuntime, ILicenseChecker licenseChecker, TerminalOptions options, ITerminalHelpProvider terminalHelpProvider, ITerminalEventHandler? terminalEventHandler, ILogger<CommandHandler> logger)

Parameters

commandRuntime ICommandRuntime
licenseChecker ILicenseChecker
options TerminalOptions
terminalHelpProvider ITerminalHelpProvider
terminalEventHandler ITerminalEventHandler
logger ILogger<CommandHandler>

Methods

HandleCommandAsync(CommandHandlerContext)

Handles the command request.

public Task<CommandHandlerResult> HandleCommandAsync(CommandHandlerContext context)

Parameters

context CommandHandlerContext

The handler context.

Returns

Task<CommandHandlerResult>

The handler result.