public override bool MoveToNext() { if (this.current == null) { throw new InvalidOperationException(System.Transactions.SR.GetString("OperationInvalidOnAnEmptyDocument")); } bool flag = false; if (this.state != XPathNodeType.Text) { ElementNode parent = this.current.parent; if (parent == null) { return(flag); } ElementNode node2 = parent.MoveToNext(); if (((node2 == null) && (parent.text != null)) && !parent.movedToText) { this.state = XPathNodeType.Text; parent.movedToText = true; return(true); } if (node2 != null) { this.state = XPathNodeType.Element; flag = true; this.current = node2; } } return(flag); }
public override bool MoveToNext() { if (this.current == null) { throw new InvalidOperationException(SR.GetString(SR.OperationInvalidOnAnEmptyDocument)); } bool retval = false; if (this.state != XPathNodeType.Text) { ElementNode parent = this.current.parent; if (parent != null) { ElementNode temp = parent.MoveToNext(); if (temp == null && parent.text != null && !parent.movedToText) { this.state = XPathNodeType.Text; parent.movedToText = true; retval = true; } else if (temp != null) { this.state = XPathNodeType.Element; retval = true; this.current = temp; } } } return(retval); }
public override bool MoveToNext() { if (this.current == null) { #pragma warning disable 618 Fx.Assert("Operation is invalid on an empty document"); #pragma warning restore 618 throw new InvalidOperationException(); } bool retval = false; if (this.state != XPathNodeType.Text) { ElementNode parent = this.current.parent; if (parent != null) { TraceNode temp = parent.MoveToNext(); if (temp == null && parent.text != null && !parent.movedToText) { this.state = XPathNodeType.Text; parent.movedToText = true; this.current = parent; retval = true; } else if (temp != null) { this.state = temp.NodeType; retval = true; this.current = temp; } } } return(retval); }
public override bool MoveToNext() { if (this.current == null) { throw new InvalidOperationException(); } bool flag = false; if (this.state != XPathNodeType.Text) { ElementNode parent = this.current.parent; if (parent == null) { return(flag); } TraceNode node2 = parent.MoveToNext(); if (((node2 == null) && (parent.text != null)) && !parent.movedToText) { this.state = XPathNodeType.Text; parent.movedToText = true; this.current = parent; return(true); } if (node2 != null) { this.state = node2.NodeType; flag = true; this.current = node2; } } return(flag); }