mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-14 17:54:42 +00:00
Fix CA1873 warning and consolidate test fixtures (#313)
This commit is contained in:
@@ -5,14 +5,15 @@ using MediatR;
|
||||
namespace Shared.Application.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
/// MediatR pipeline behavior that runs registered FluentValidation validators before the handler,
|
||||
/// MediatR pipeline behavior that runs registered FluentValidation validators
|
||||
/// before the handler,
|
||||
/// throwing <see cref="ValidationException" /> if any report failures.
|
||||
/// </summary>
|
||||
public class ValidationBehavior<TRequest, TResponse>(IEnumerable<IValidator<TRequest>> validators)
|
||||
: IPipelineBehavior<TRequest, TResponse>
|
||||
where TRequest : IRequest<TResponse>
|
||||
{
|
||||
/// <inheritdoc/>
|
||||
/// <inheritdoc />
|
||||
public async Task<TResponse> Handle(
|
||||
TRequest request,
|
||||
RequestHandlerDelegate<TResponse> next,
|
||||
|
||||
Reference in New Issue
Block a user