Interface ITerminalEventHandler
The terminal event handler.
public interface ITerminalEventHandler
Methods
AfterCommandCheckAsync(Command, CommandCheckerResult)
Override this method if you will perform an asynchronous operation after ICommandHandler ends a command check.
Task AfterCommandCheckAsync(Command command, CommandCheckerResult result)
Parameters
commandCommandThe command object.
resultCommandCheckerResultThe command run result.
Returns
Remarks
The framework will not call AfterCommandCheckAsync(Command, CommandCheckerResult) if there is an error during the command check.
AfterCommandRouteAsync(TerminalRequest, Command?, CommandResult?)
Override this method if you will perform an asynchronous operation after ICommandRouter ends a command request and process the command result.
Task AfterCommandRouteAsync(TerminalRequest request, Command? command, CommandResult? result)
Parameters
requestTerminalRequestThe command request.
commandCommandThe command object. May be
null.resultCommandResultThe command router result. May be
null.
Returns
Remarks
The framework will call AfterCommandRouteAsync(TerminalRequest, Command?, CommandResult?) even if there is an error during command routing.
The command and result parameters may be null. The router constructs a command object if the parser, handler, and checker pass
and routes a command to run.
AfterCommandRunAsync(Command, CommandRunnerResult)
Override this method if you will perform an asynchronous operation after ICommandHandler ends a command run and process the command result.
Task AfterCommandRunAsync(Command command, CommandRunnerResult result)
Parameters
commandCommandThe command object.
resultCommandRunnerResultThe command run result.
Returns
Remarks
The framework will not call AfterCommandRunAsync(Command, CommandRunnerResult) if there is an error during the command run.
BeforeCommandCheckAsync(Command)
Override this method if you will perform an asynchronous operation before ICommandHandler starts a command check.
Task BeforeCommandCheckAsync(Command command)
Parameters
commandCommandThe command object.
Returns
BeforeCommandRouteAsync(TerminalRequest)
Override this method if you will perform an asynchronous operation before ICommandRouter starts a command request.
Task BeforeCommandRouteAsync(TerminalRequest request)
Parameters
requestTerminalRequestThe command request.
Returns
BeforeCommandRunAsync(Command)
Override this method if you will perform an asynchronous operation before ICommandHandler starts a command run.
Task BeforeCommandRunAsync(Command command)
Parameters
commandCommandThe command object.