Ejemplo n.º 1
0
        /// <summary>
        /// Adds the given results to the error list
        /// </summary>
        public static void AddRange(this IErrorList errorList, string document, IEnumerable <System.ComponentModel.DataAnnotations.ValidationResult> results)
        {
            Guard.NotNull(() => errorList, errorList);

            if (results != null)
            {
                results.ForEach(r => errorList.AddMessage(r.ErrorMessage, document, ErrorCategory.Error));
            }
        }