Пример #1
0
        public void Add(ValidationFailure validationFailure)
        {
            if (string.IsNullOrEmpty(validationFailure?.ErrorMessage?.Trim()))
            {
                return;
            }

            if (_failures.Contains(validationFailure) || Exists(validationFailure.PropertyName, validationFailure.ErrorMessage))
            {
                return;
            }

            _failures.Add(validationFailure);
        }
Пример #2
0
 public MethodResult(ValidationFailure validationFailure)
 {
     Add(validationFailure);
 }