コード例 #1
0
 public CompositeValidator(IValidator[] configuredValidators)
 {
     Validators = configuredValidators
         .Concat(MandatoryValidators)
         .GroupBy(validator => validator.GetType())
         .Select(groupedByType => groupedByType.FirstOrDefault(validator => validator.TreatsWarningsAsErrors) ?? groupedByType.First())
         .Distinct()
         .ToArray();
 }