Interface IRequest<TResponse>
- Namespace
- SimpleMediator
- Assembly
- SimpleMediator.dll
Represents a request routed to a single handler that produces a response.
public interface IRequest<out TResponse>
Type Parameters
TResponseType produced by the handler when the flow completes.
Examples
public sealed record GetInvoiceById(Guid InvoiceId) : IRequest<Option<InvoiceReadModel>>;
Remarks
Typical implementations are ICommand<TResponse> and IQuery<TResponse>. Prefer immutable classes or records so requests remain deterministic and easy to test.