fix constructor injection for _validators

This commit is contained in:
A-Soltani 2021-12-20 08:55:38 +03:30
parent 5f649db4ae
commit f7a3aaec54

View File

@ -3,9 +3,9 @@
public class ValidatorBehavior<TRequest, TResponse> : IPipelineBehavior<TRequest, TResponse>
{
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;
_logger = logger;