Exemple #1
0
 public static void ThrowOnError(this NzbDroneValidationResult result)
 {
     if (!result.IsValid)
     {
         throw new ValidationException(result.Errors);
     }
 }
Exemple #2
0
        public static NzbDroneValidationResult Filter(this NzbDroneValidationResult result, params string[] fields)
        {
            var failures = result.Failures.Where(v => fields.Contains(v.PropertyName)).ToArray();

            return(new NzbDroneValidationResult(failures));
        }