A lightweight in-process CQRS library simplifying command, query, and event handling.
Define messages using simple interfaces:
ICommand
: For command messages.IQuery<TResult>
: For query messages.IEvent
: For notification-style messages.
Create message handlers by implementing corresponding interfaces:
ICommandHandler<T>
: For handling commands.IQueryHandler<T, TResult>
: For handling queries.IEventHandler<T>
: For handling events.
Easily dispatch messages to handlers:
- Use the dispatcher to route messages to their respective handlers.
- Automatic handler registration through dependency injection.
- No manual handler registration needed.
Enhance message processing with interceptors:
- Modify or enhance command/query behavior by forming a customizable pipeline with execution order.
- Use the
PipelinePriorityAttribute
to specify interceptor order.