CommandBus class
Регистрация и выполнение команд через соответствующие обработчики.
Constructors
-
CommandBus({Iterable<
CommandMiddleware> middlewares = const []}) - Можно передать middleware при создании экземпляра.
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
-
dispatch<
R> (Command< R> command) → Future<R> - Выполняет команду и возвращает результат.
-
dispatchSafe<
R> (Command< R> command) → Future<Result< R> > - Выполняет команду и возвращает результат в виде Result.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
register<
C extends Command< (R> , R>CommandHandler< C, R> handler) → void -
Регистрирует обработчик для команды
C. -
toString(
) → String -
A string representation of this object.
inherited
-
unregister<
C extends Command< (Object?> >{bool silent = false}) → void -
Отменяет регистрацию обработчика для команды
C.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited