Class CommandBus
- Concrete implementation of ICommandBus.
- Multiple handlers per command type (fan-out) by design.
- Thread-safe for Register/Unregister/Dispatch using a lock.
- Dispatch executes handlers outside the lock using a snapshot.
Assembly: Glitch9.dll
Syntax
public class CommandBus : MessageBusBase<ICommand>, ICommandBus
Constructors
|
Edit this page
View Source
CommandBus(string)
Declaration
public CommandBus(string debugName = null)
Parameters
| Type |
Name |
Description |
| string |
debugName |
|
Methods
|
Edit this page
View Source
Register<T>(ICommandHandler<T>)
Declaration
public IDisposable Register<T>(ICommandHandler<T> handler) where T : ICommand
Parameters
Returns
Type Parameters
|
Edit this page
View Source
Unregister<T>(ICommandHandler<T>)
Declaration
public void Unregister<T>(ICommandHandler<T> handler) where T : ICommand
Parameters
Type Parameters
Implements
Extension Methods