Namespace Savvyio.Dispatchers
Use the Savvyio.Dispatchers namespace to route commands, queries, and events to their registered handlers. The dispatcher layer decouples the caller from the handler — the caller sends a request to the dispatcher and the framework locates the correct handler.
Start with FireForgetDispatcher for commands and domain events (no return value expected) and RequestReplyDispatcher for queries that return a result. Both extend the base Dispatcher and use a ServiceLocator to resolve handlers from the DI container. For a unified entry point that routes all request types, use Mediator from the Savvyio.Extensions namespace.
Availability: .NET 10 and .NET 9
Classes
Dispatcher
Represents the base class from which all implementations of the dispatcher concept should derive. This is an abstract class.
FireForgetDispatcher
Provides a generic dispatcher that uses Fire-and-Forget/In-Only MEP. This is an abstract class.
RequestReplyDispatcher
Provides a generic dispatcher that uses Request-Reply/In-Out MEP. This is an abstract class.
ServiceLocator
Provides a default implementation of the IServiceLocator interface.
Interfaces
IDispatcher
A marker interface that specifies a dispatcher that encapsulates how a set of objects interact.
IServiceLocator
Provides a generic way to locate implementations of service objects.