Exemplo n.º 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));
        }
Exemplo n.º 2
0
 private static void WriteValidationExceptions(ValidationResult result)
 {
     foreach (var ve in result.ValidationExceptions)
     {
         Console.WriteLine(ve);
     }
 }