Table of Contents

Interface ITerminalEventHandler

Namespace
OneImlx.Terminal.Events
Assembly
OneImlx.Terminal.dll

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

command Command

The command object.

result CommandCheckerResult

The command run result.

Returns

Task

Remarks

The framework will not call AfterCommandCheckAsync(Command, CommandCheckerResult) if there is an error during the command check.

AfterCommandRouteAsync(CommandRoute, Command?, CommandRouterResult?)

Override this method if you will perform an asynchronous operation after ICommandRouter ends a command route and process the command result.

Task AfterCommandRouteAsync(CommandRoute commandRoute, Command? command, CommandRouterResult? result)

Parameters

commandRoute CommandRoute

The command route.

command Command

The command object. May be null.

result CommandRouterResult

The command router result. May be null.

Returns

Task

Remarks

The framework will call AfterCommandRouteAsync(CommandRoute, Command?, CommandRouterResult?) 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

command Command

The command object.

result CommandRunnerResult

The command run result.

Returns

Task

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

command Command

The command object.

Returns

Task

BeforeCommandRouteAsync(CommandRoute)

Override this method if you will perform an asynchronous operation before ICommandRouter starts a command route.

Task BeforeCommandRouteAsync(CommandRoute commandRoute)

Parameters

commandRoute CommandRoute

The command route.

Returns

Task

BeforeCommandRunAsync(Command)

Override this method if you will perform an asynchronous operation before ICommandHandler starts a command run.

Task BeforeCommandRunAsync(Command command)

Parameters

command Command

The command object.

Returns

Task