Create a new instance of CommandRouter.
The container instance for dependency resolution.
Finds a command that matches the given event.
The incoming event to match against commands.
The matching command, or undefined if no match is found.
Runs the given command with the provided event.
The event to handle.
Optionalcommand: ICommandHandler<W, X>
The command to execute.
The result of the command execution, or void if no command is found.
StaticcreateCreates a new instance of CommandRouter.
This static method initializes a CommandRouter with the specified options.
The type of the incoming event (default: IncomingEvent).
The type of the outgoing response (default: OutgoingResponse).
The configuration options for the CommandRouter.
A new instance of CommandRouter configured with the provided options.
Class representing a CommandRouterEventHandler. Responsible for finding and dispatching commands based on incoming events.
Author
Mr. Stone evensstone@gmail.com