Browse Source

fix constructor injection for _validators (#1809)

pull/1878/head
A-Soltani 2 years ago
committed by GitHub
parent
commit
4458a096c9
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      src/Services/Ordering/Ordering.API/Application/Behaviors/ValidatorBehavior.cs

+ 2
- 2
src/Services/Ordering/Ordering.API/Application/Behaviors/ValidatorBehavior.cs View File

@ -3,9 +3,9 @@
public class ValidatorBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse> public class ValidatorBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
{ {
private readonly ILogger<ValidatorBehavior<TRequest, TResponse>> _logger; private readonly ILogger<ValidatorBehavior<TRequest, TResponse>> _logger;
private readonly IValidator<TRequest>[] _validators;
private readonly IEnumerable<IValidator<TRequest>> _validators;
public ValidatorBehavior(IValidator<TRequest>[] validators, ILogger<ValidatorBehavior<TRequest, TResponse>> logger)
public ValidatorBehavior(IEnumerable<IValidator<TRequest>> validators, ILogger<ValidatorBehavior<TRequest, TResponse>> logger)
{ {
_validators = validators; _validators = validators;
_logger = logger; _logger = logger;


Loading…
Cancel
Save