Class CommandHandler
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
ICommandRuntimelicenseChecker
ILicenseCheckeroptions
TerminalOptionsterminalHelpProvider
ITerminalHelpProviderlogger
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
ICommandRuntimelicenseChecker
ILicenseCheckeroptions
TerminalOptionsterminalHelpProvider
ITerminalHelpProviderterminalEventHandler
ITerminalEventHandlerlogger
ILogger<CommandHandler>
Methods
HandleCommandAsync(CommandHandlerContext)
Handles the command request.
public Task<CommandHandlerResult> HandleCommandAsync(CommandHandlerContext context)
Parameters
context
CommandHandlerContextThe handler context.
Returns
- Task<CommandHandlerResult>
The handler result.