SetErrors() публичный Метод

Set the errors at the object level
public SetErrors ( IList errors, HashSet &affectedProperties ) : ErrorsDictionaryUpdateType
errors IList The errors.
affectedProperties HashSet The affected properties.
Результат ErrorsDictionaryUpdateType
Пример #1
0
        void ValidateProperty(string propertyName)
        {
            var results = new ValidationResultCollection();

            AttributeBasedValidation(propertyName, results);

            OnValidateProperty(propertyName, results);

            OnErrorsChanged(propertyName, ErrorsDictionary.SetErrors(propertyName, results));
        }
Пример #2
0
        void ValidateObject()
        {
            var results = new ValidationResultCollection();

            OnValidateObject(results);
            OnErrorsChanged("", ErrorsDictionary.SetErrors(results, out var affectedProperties));

            foreach (var p in affectedProperties)
            {
                OnErrorsChanged(p);
            }
        }