@brainhubeu/sqrs › "commands/DefaultCommandBus" › DefaultCommandBus
- DefaultCommandBus
+ new DefaultCommandBus(commandHandlerProvider
: CommandHandlerProvider, commandValidatorProvider
: CommandValidatorProvider): DefaultCommandBus
Defined in commands/DefaultCommandBus.ts:28
Parameters:
Name | Type |
---|---|
commandHandlerProvider |
CommandHandlerProvider |
commandValidatorProvider |
CommandValidatorProvider |
Returns: DefaultCommandBus
▪ dependencies: Dependencies‹typeof DefaultCommandBus› = [ commandHandlerProviderId, commandValidatorProviderId ]
Defined in commands/DefaultCommandBus.ts:25
▸ dispatch(command
: Command): Promise‹CommandResult›
Implementation of CommandBus
Defined in commands/DefaultCommandBus.ts:43
Dispatches a command in the same process and returns promise resolving with command result
memberof
DefaultCommandBus
Parameters:
Name | Type |
---|---|
command |
Command |
Returns: Promise‹CommandResult›