Namespace Stratara.Abstractions.Mediator
Interfaces
- IAggregateScopedCommand
Command whose dispatch must be serialised against the same aggregate to avoid concurrent writes on the underlying event stream.
- IAuthorizingMediator
Marker interface for an IMediator decorator that enforces
[RequireRole]authorization before dispatching to handlers. The startup-time authorization validator uses this marker to recognise the authorizing dispatch path at runtime.
- ICommand
A command — a write operation that produces no result. Dispatched via IMediator to the matching ICommandHandler<TRequest>, or via
ICommandOutboxDispatcherfor asynchronous out-of-process execution.
- ICommandBase
Common base for any command type. Used by infrastructure (audit, outbox) to match command instances regardless of whether they return a result.
- ICommandHandler<TRequest>
Handler for a command that returns no result. Resolved by IMediator via DI; registered automatically by
AddCommandHandlersFromAssemblyContaining<T>().
- ICommand<TResult>
A command that synchronously returns a result. Used for in-process exceptions to the outbox-dispatch rule — e.g. registration flows, infrastructure-destructive operations, or anything that requires the caller to receive the result before the dispatch completes.
- IHeavyCommand
Opt-in marker for long-running commands that must be processed on a dedicated worker lane so they cannot starve interactive commands. Implement it on an ICommand or ICommand<TResult> whose handler does heavy, slow work (bulk back-fills, crawls, re-indexing, large imports).
- IMediator
Dispatches a request to its matching handler through any registered IPipelineBehavior<TRequest> or IPipelineBehavior<TRequest, TResult> chain.
- IPipelineBehavior<TRequest>
Pipeline behavior invoked around each IMediator dispatch of an IRequest (commands without a result). Behaviors form a chain: each calls
nextto invoke the next behavior or the handler at the chain's end.
- IPipelineBehavior<TRequest, TResult>
Pipeline behavior invoked around each IMediator dispatch of an IRequest<TResult>. Behaviors form a chain: each calls
nextto invoke the next behavior or the handler at the chain's end.
- IQuery
A query that returns no result. Marker interface — must be side-effect-free.
- IQueryHandler<TRequest, TResult>
Handler for a query or command that returns
TResult. Resolved by IMediator via DI; registered automatically byAddQueryHandlersFromAssemblyContaining<T>().
- IQuery<TResult>
A query that returns
TResult. Must be side-effect-free — no state changes, no message-bus dispatch, no external system mutation. Implement ICommand or ICommand<TResult> for any write operation.
- IRequest
Marker interface for a request that returns no result.
- IRequest<TResult>
Marker interface for a request that returns a result of type
TResult.