CommandHandlerRegistry<TState extends State> class

Registry for command handlers

Constructors

CommandHandlerRegistry()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

clear() → void
Clear all registered handlers (useful for testing)
getAllHandlers() List<CommandHandler<TState>>
Get all registered handlers
getHandler(Command command) CommandHandler<TState>?
Get a handler for a command
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
register<TCommand extends Command>(CommandHandler<TState> handler) → void
Register a command handler for a specific command type
registerAggregate(AggregateCommandHandler<TState> handler) → void
Register an aggregate command handler
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited