Behaviors
Namespace: RA.Utilities.Feature.Behaviors
RA.Utilities.Feature.Behaviors provides built-in IPipelineBehavior and INotificationBehavior implementations for common cross-cutting concerns.
📦 Request Pipeline Behaviors
| Behavior | Interface | Purpose |
|---|---|---|
LoggingBehavior<TRequest> | IPipelineBehavior<TRequest> | Logs each request and its result |
LoggingBehavior<TRequest, TResponse> | IPipelineBehavior<TRequest, TResponse> | Logs each request and its response |
ValidationBehavior<TRequest> | IPipelineBehavior<TRequest> | Validates requests via FluentValidation; throws BadRequestException on invalid requests |
ValidationBehavior<TRequest, TResponse> | IPipelineBehavior<TRequest, TResponse> | Validates requests via FluentValidation; throws BadRequestException on invalid requests |
📬 Notification Pipeline Behaviors
| Behavior | Interface | Purpose |
|---|---|---|
NotificationLoggingBehavior<TNotification> | INotificationBehavior<TNotification> | Logs notification handling start and finish |
NotificationMetricsBehavior<TNotification> | INotificationBehavior<TNotification> | Measures handler duration; warns if over 500 ms |
NotificationRetryBehavior<TNotification> | INotificationBehavior<TNotification> | Retries failed handlers with configurable backoff |
LoggingBehavior
LoggingBehavior is an implementation of the IPipelineBehavior interface.
ValidationBehavior
The ValidationBehavior is an implementation of the IPipelineBehavior interface that automatically validates incoming requests using FluentValidation.
NotificationLoggingBehavior
NotificationLoggingBehavior is an implementation of the INotificationBehavior interface.
NotificationMetricsBehavior
NotificationMetricsBehavior is an implementation of the INotificationBehavior interface.
NotificationRetryBehavior
NotificationRetryBehavior is an implementation of the INotificationBehavior interface.