mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-10-15 01:54:43 +00:00
Upgrade MediatR to 12.5.0 and forward cancellation tokens through pipeline behaviors (#320)
This commit is contained in:
@@ -67,7 +67,7 @@ public partial class UnhandledExceptionLoggingBehavior<TRequest, TResponse>
|
||||
{
|
||||
try
|
||||
{
|
||||
return await next();
|
||||
return await next(cancellationToken);
|
||||
}
|
||||
catch (ValidationException)
|
||||
{
|
||||
@@ -78,7 +78,7 @@ public partial class UnhandledExceptionLoggingBehavior<TRequest, TResponse>
|
||||
{
|
||||
if (_logger.IsEnabled(LogLevel.Error))
|
||||
LogUnhandledException(ex, typeof(TRequest).Name, Serialize(request));
|
||||
|
||||
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class ValidationBehavior<TRequest, TResponse>(IEnumerable<IValidator<TReq
|
||||
)
|
||||
{
|
||||
if (!validators.Any())
|
||||
return await next();
|
||||
return await next(cancellationToken);
|
||||
|
||||
ValidationContext<TRequest> context = new(request);
|
||||
|
||||
@@ -35,6 +35,6 @@ public class ValidationBehavior<TRequest, TResponse>(IEnumerable<IValidator<TReq
|
||||
if (failures.Count > 0)
|
||||
throw new ValidationException(failures);
|
||||
|
||||
return await next();
|
||||
return await next(cancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="MediatR" Version="12.4.1" />
|
||||
<PackageReference Include="MediatR" Version="12.5.0" />
|
||||
<PackageReference Include="FluentValidation" Version="11.3.0" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Abstractions" Version="10.0.1" />
|
||||
</ItemGroup>
|
||||
|
||||
Reference in New Issue
Block a user