예제 #1
0
        private void OnPropertyChanged(object sender, PropertyChangedEventArgs args)
        {
            if (this.Children != null)
            {
                SubscriptionNode nodeMatchingPropertyName = null;
                for (int i = 0; i < this.Children.Count; i++)
                {
                    var child = this.Children[i];
                    if (child.PropertyAccessNode.Property.Name == args.PropertyName)
                    {
                        nodeMatchingPropertyName = child;
                        break;
                    }
                }

                if (nodeMatchingPropertyName == null)
                {
                    return;
                }

                nodeMatchingPropertyName.UpdateSubject(this.Subject);
            }

            if (PropertyChanged == null)
            {
                return;
            }

            PropertyChanged();
        }
예제 #2
0
 private void BuildChildren(PropertyAccessTreeNode root)
 {
     for (int i = 0; i < root.Children.Count; i++)
     {
         var childSubscriptionNode = new SubscriptionNode(_subscriberCallback, (PropertyAccessNode)root.Children[i]);
         _children.Add(childSubscriptionNode);
     }
 }
 private void BuildChildren()
 {
     for (int i = 0; i < _propertyAccessNode.Children.Count; i++)
     {
         var childSubscriptionNode = new SubscriptionNode(_subscriberChangingCallback, _subscriberChangedCallback, (PropertyAccessNode)_propertyAccessNode.Children[i]);
         _children.Add(childSubscriptionNode);
     }
 }
예제 #4
0
        public override SubscriptionNode CreateSubscription(INotifyPropertyChanged parameter)
        {
            var subscriptionNode = new SubscriptionNode()
            {
                AccessNode = this,
            };

            SubscribeToChildren(subscriptionNode, parameter);

            return(subscriptionNode);
        }
예제 #5
0
        public override SubscriptionNode CreateSubscription(INotifyPropertyChanged parameter)
        {
            var subscriptionNode = new SubscriptionNode()
            {
                AccessNode = this,
            };

            SubscribeToChildren(subscriptionNode, parameter);

            return subscriptionNode;
        }
        protected void SubscribeToChildren(SubscriptionNode subscriptionNode, INotifyPropertyChanged parameter)
        {
            for (int i = 0; i < this.Children.Count; i++)
            {
                PropertyAccessTreeNode child = this.Children[i];
                if (child.Children.Count == 0)
                    continue;

                SubscriptionNode childSubscriptionNode = child.CreateSubscription(parameter);

                if (subscriptionNode.Children == null)
                    subscriptionNode.Children = new List<SubscriptionNode>();

                subscriptionNode.Children.Add(childSubscriptionNode);
            }
        }
        protected void SubscribeToChildren(SubscriptionNode subscriptionNode, INotifyPropertyChanged parameter)
        {
            for (int i = 0; i < this.Children.Count; i++)
            {
                PropertyAccessTreeNode child = this.Children[i];
                if (child.Children.Count == 0)
                {
                    continue;
                }

                SubscriptionNode childSubscriptionNode = child.CreateSubscription(parameter);

                if (subscriptionNode.Children == null)
                {
                    subscriptionNode.Children = new List <SubscriptionNode>();
                }

                subscriptionNode.Children.Add(childSubscriptionNode);
            }
        }