예제 #1
0
        public void UnsubscribeFromHasChanged(UINotifyPropertyChanges subscription)
        {
            if (subscription == null)
            {
                throw new ArgumentNullException(nameof(subscription));
            }

            if (this.inheritHasChangedFrom.Contains(subscription))
            {
                this.inheritHasChangedFrom.Remove(subscription);
            }
        }
예제 #2
0
        public void UnsubscribeFromErrors(UINotifyPropertyChanges subscription)
        {
            if (subscription == null)
            {
                throw new ArgumentNullException(nameof(subscription));
            }

            if (this.inheritErrorsFrom.Contains(subscription))
            {
                this.inheritErrorsFrom.Remove(subscription);
                subscription.OnErrorChanged -= errorInheritFrom_ErrorChanged;
            }
        }
예제 #3
0
        public void SubscribeToErrors(UINotifyPropertyChanges subscription)
        {
            if (subscription == null)
            {
                throw new ArgumentNullException(nameof(subscription));
            }

            if (!this.inheritErrorsFrom.Contains(subscription))
            {
                this.inheritErrorsFrom.Add(subscription);
                subscription.OnErrorChanged += errorInheritFrom_ErrorChanged;
            }
        }
예제 #4
0
        public void InheritHasChanged(UINotifyPropertyChanges inheritFrom)
        {
            if (inheritFrom == null)
            {
                throw new ArgumentNullException(nameof(inheritFrom));
            }

            if (!this.inheritHasChangedFrom.Contains(inheritFrom))
            {
                this.inheritHasChangedFrom.Add(inheritFrom);
                inheritFrom.PropertyChanged += inheritedHasChanged_PropertyChanged;
            }
        }