예제 #1
0
 static Result AtLeastOneWithSubject(object subject, params Func<dynamic, Result>[] cases)
 {
     var result = new Result{Success = false};
     foreach (var check in cases)
     {
         result.Or(check(That(subject)));
     }
     return result;
 }
예제 #2
0
 static Result AtLeastOneWithStems(IEnumerable<Check> subjects, params Func<dynamic, Result>[] cases)
 {
     var result = new Result{Success = false};
     foreach (var subject in subjects)
     {
         foreach (var check in cases)
         {
             result.Or(check(subject));
         }
     }
     return result;
 }