public override bool IsRedundantVersion(PropertyAccessTreeNode other) { var otherAsPropertyNode = other as PropertyAccessNode; if (otherAsPropertyNode == null) return false; return other != this && otherAsPropertyNode.Property == this.Property; }
private void BuildChildren(PropertyAccessTreeNode root) { foreach (PropertyAccessTreeNode t in root.Children) { var childSubscriptionNode = new SubscriptionNode(_subscriberCallback, (PropertyAccessNode)t); _children.Add(childSubscriptionNode); } }
public override bool IsRedundantVersion(PropertyAccessTreeNode other) { ConstantNode otherAsConstantNode = other as ConstantNode; if (otherAsConstantNode == null) return false; return other != this && otherAsConstantNode.Value == this.Value; }
public RootSubscription(Action <TListener, object> subscriberCallback, PropertyAccessTreeNode parameterNode) { _propertyAccessTreeNode = parameterNode; _children = new List <SubscriptionNode>(); _subscriberCallback = subscriberCallback; BuildChildren(parameterNode); }
public override bool IsRedundantVersion(PropertyAccessTreeNode other) { var otherAsPropertyNode = other as PropertyAccessNode; if (otherAsPropertyNode == null) { return(false); } return(other != this && otherAsPropertyNode.Property == this.Property); }
public override bool IsRedundantVersion(PropertyAccessTreeNode other) { ConstantNode otherAsConstantNode = other as ConstantNode; if (otherAsConstantNode == null) { return(false); } return(other != this && otherAsConstantNode.Value == this.Value); }
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); }
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; } }
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); } }
public override bool IsRedundantVersion(PropertyAccessTreeNode other) { var otherAsParameterNode = other as ParameterNode; return(otherAsParameterNode != null && otherAsParameterNode != this && this.Name == otherAsParameterNode.Name); }
public abstract bool IsRedundantVersion(PropertyAccessTreeNode other);
public override bool IsRedundantVersion(PropertyAccessTreeNode other) { var otherAsParameterNode = other as ParameterNode; return otherAsParameterNode != null && otherAsParameterNode != this && this.Name == otherAsParameterNode.Name; }