Example #1
0
        public ValidationResult MergeWith(ValidationResult validationResult)
        {
            if (validationResult.IsSuccess)
            {
                return this;
            }

            if (validationResult.ValidationExceptions.Count == 0)
            {
                return this;
            }

            return new ValidationResult(this.ValidationExceptions.Concat(validationResult.ValidationExceptions));
        }
 private static void WriteValidationExceptions(ValidationResult result)
 {
     foreach (var ve in result.ValidationExceptions)
     {
         Console.WriteLine(ve);
     }
 }