Beispiel #1
0
        private ICompositeValidation <T> UpdateList(string groupName, List <Failure> newFailures)
        {
            var oldFailures = Failures.Where(x => x.GroupName != groupName).ToList();

            if (newFailures.Any() && HasSummaryMessage && !oldFailures.Any())
            {
                oldFailures.Insert(0, new Failure(this));
            }

            Failures = new ReadOnlyCollection <Failure>(oldFailures.Concat(newFailures).ToList());

            return(this);
        }