/// <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)); } }