Table of Contents

Namespace Savvyio.Handlers

Assembly: Savvyio.Core.dll

Use the Savvyio.Handlers namespace to build the handler layer of a CQRS application. It provides the registry contracts IFireForgetRegistry (for command and domain event handlers) and IRequestReplyRegistry (for query handlers), together with activator and handler base interfaces. The OrphanedHandlerException signals that a request reached a dispatcher with no registered handler.

Start with IFireForgetRegistry<TRequest> for fire-and-forget command or event handlers and IRequestReplyRegistry<TRequest> for request-reply query handlers. Use RegisterAsync on either registry to subscribe handler delegates. If you use automatic handler discovery, configure it through SavvyioOptions in Savvyio.Extensions.DependencyInjection.

Availability: .NET 10 and .NET 9

Extension Members

Type Ext Methods
IFireForgetRegistry ⬇️ RegisterAsync<TRequest>
IRequestReplyRegistry ⬇️ RegisterAsync<TRequest, TResponse>

Classes

FireForgetRegistryExtensions

Extension methods for the IFireForgetRegistry<TRequest> interface.

OrphanedHandlerException

The exception that is thrown when an IHandler<TRequest> implementation cannot be resolved.

RequestReplyRegistryExtensions

Extension methods for the IRequestReplyRegistry<TRequest> interface.

Interfaces

IFireForgetActivator<TRequest>

Specifies a way of invoking Fire-and-Forget/In-Only MEP delegates that handles TRequest.

IFireForgetHandler<TRequest>

Defines a generic handler that uses Fire-and-Forget/In-Only MEP.

IFireForgetRegistry<TRequest>

Specifies a Fire-and-Forget/In-Only MEP registry that store delegates responsible for handling type TRequest.

IRequestReplyActivator<TRequest>

Specifies a way of invoking Request-Reply/In-Out MEP delegates that handles TRequest.

IRequestReplyHandler<TRequest>

Defines a generic Request-Reply/In-Out MEP handler.

IRequestReplyRegistry<TRequest>

Specifies a Request-Reply/In-Out MEP registry that store delegates responsible for handling type TRequest.