コード例 #1
0
        public override bool IsRedundantVersion(PropertyAccessTreeNode other)
        {
            var otherAsPropertyNode = other as PropertyAccessNode;
            if (otherAsPropertyNode == null)
                return false;

            return other != this && otherAsPropertyNode.Property == this.Property;
        }
コード例 #2
0
 private void BuildChildren(PropertyAccessTreeNode root)
 {
     foreach (PropertyAccessTreeNode t in root.Children)
     {
         var childSubscriptionNode = new SubscriptionNode(_subscriberCallback, (PropertyAccessNode)t);
         _children.Add(childSubscriptionNode);
     }
 }
コード例 #3
0
ファイル: ConstantNode.cs プロジェクト: lycilph/Projects
        public override bool IsRedundantVersion(PropertyAccessTreeNode other)
        {
            ConstantNode otherAsConstantNode = other as ConstantNode;
            if (otherAsConstantNode == null)
                return false;

            return other != this && otherAsConstantNode.Value == this.Value;
        }
コード例 #4
0
                public RootSubscription(Action <TListener, object> subscriberCallback, PropertyAccessTreeNode parameterNode)
                {
                    _propertyAccessTreeNode = parameterNode;
                    _children           = new List <SubscriptionNode>();
                    _subscriberCallback = subscriberCallback;

                    BuildChildren(parameterNode);
                }
コード例 #5
0
        public override bool IsRedundantVersion(PropertyAccessTreeNode other)
        {
            var otherAsPropertyNode = other as PropertyAccessNode;

            if (otherAsPropertyNode == null)
            {
                return(false);
            }

            return(other != this && otherAsPropertyNode.Property == this.Property);
        }
コード例 #6
0
ファイル: ConstantNode.cs プロジェクト: lycilph/Projects
        public override bool IsRedundantVersion(PropertyAccessTreeNode other)
        {
            ConstantNode otherAsConstantNode = other as ConstantNode;

            if (otherAsConstantNode == null)
            {
                return(false);
            }

            return(other != this && otherAsConstantNode.Value == this.Value);
        }
コード例 #7
0
        public SubscriptionTree CreateSubscriptionTree(INotifyPropertyChanged parameter)
        {
            List <SubscriptionNode> subscribers = new List <SubscriptionNode>(this.Children.Count);

            for (int i = 0; i < this.Children.Count; i++)
            {
                PropertyAccessTreeNode child = this.Children[i];
                if (child.Children.Count > 0)
                {
                    var subscriptionNode = child.CreateSubscription(parameter);
                    subscribers.Add(subscriptionNode);
                }
            }
            var subscriptionTree = new SubscriptionTree(parameter, subscribers);

            return(subscriptionTree);
        }
コード例 #8
0
        private static void AddBranch(PropertyAccessTree tree, Stack <PropertyAccessTreeNode> currentNodeBranch)
        {
            if (currentNodeBranch.Count == 0)
            {
                return;
            }

            PropertyAccessTreeNode currentNode = currentNodeBranch.Pop();

            tree.Children.Add(currentNode);

            while (currentNodeBranch.Count != 0)
            {
                PropertyAccessTreeNode nextNode = currentNodeBranch.Pop();
                currentNode.Children.Add(nextNode);
                currentNode = nextNode;
            }
        }
コード例 #9
0
        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);
            }
        }
コード例 #10
0
        public override bool IsRedundantVersion(PropertyAccessTreeNode other)
        {
            var otherAsParameterNode = other as ParameterNode;

            return(otherAsParameterNode != null && otherAsParameterNode != this && this.Name == otherAsParameterNode.Name);
        }
コード例 #11
0
 public abstract bool IsRedundantVersion(PropertyAccessTreeNode other);
コード例 #12
0
 public abstract bool IsRedundantVersion(PropertyAccessTreeNode other);
コード例 #13
0
ファイル: ParameterNode.cs プロジェクト: lycilph/Projects
 public override bool IsRedundantVersion(PropertyAccessTreeNode other)
 {
     var otherAsParameterNode = other as ParameterNode;
     return otherAsParameterNode != null && otherAsParameterNode != this && this.Name == otherAsParameterNode.Name;
 }