예제 #1
0
 public ValidationErrors Build()
 {
     if (this.r == null)
     {
         return(null);
     }
     return(ValidationErrors.Join(this.r));
 }
예제 #2
0
 // TODO: cut down allocations
 public static ValidationErrors ValidateList<T>(this IEnumerable<T> array, Func<T, ValidationErrors> validator) =>
     ValidationErrors.Join(array.Select((v, i) => validator(v).Nest(i.ToString())).ToArray());