Catel.Windows.Controls.WarningAndErrorValidator.AddObjectToWatchList C# (CSharp) Метод

AddObjectToWatchList() приватный Метод

Adds the object to the watch list.
private AddObjectToWatchList ( object value, IEnumerable parentEnumerable = null ) : void
value object The object to add to the watch list.
parentEnumerable IEnumerable The parent enumerable. Null if the object does not belong to an enumerable.
Результат void
        private void AddObjectToWatchList(object value, IEnumerable parentEnumerable = null)
        {
            if (value == null)
            {
                return;
            }

            lock (_objectValidationLock)
            {
                if (!_objectValidation.ContainsKey(value))
                {
                    var iNotifyPropertyChanged = value as INotifyPropertyChanged;
                    if (iNotifyPropertyChanged != null)
                    {
                        iNotifyPropertyChanged.PropertyChanged += iNotifyPropertyChanged_PropertyChanged;
                    }
                }
            }

            CheckObjectValidation(value, null, parentEnumerable);
        }