public override Expression Optimize() { this.left = this.left.Optimize(); this.right = (NodeSet)this.right.Optimize(); NodeTest nodeTest = this.right as NodeTest; if (nodeTest != null && nodeTest.Axis.Axis == Axes.Child) { NodeNameTest nodeNameTest = nodeTest as NodeNameTest; if (nodeNameTest != null) { return(new ExprSLASH(this.left, new NodeNameTest(nodeNameTest, Axes.Descendant))); } NodeTypeTest nodeTypeTest = nodeTest as NodeTypeTest; if (nodeTypeTest != null) { return(new ExprSLASH(this.left, new NodeTypeTest(nodeTypeTest, Axes.Descendant))); } } return(this); }
internal NodeNameTest(NodeNameTest source, Axes axis) : base(axis) { this._name = source._name; this.resolvedName = source.resolvedName; }