System.Xml.Xsl.Runtime.NodeRangeIterator.MoveNext C# (CSharp) Method

MoveNext() public method

Position this iterator to the next following node. Return false if there are no more following nodes, or if the end node has been reached. Return true if the Current property is set to the next node in the iteration.
public MoveNext ( ) : bool
return bool
        public bool MoveNext() {
            switch (this.state) {
                case IteratorState.HaveCurrent:
                    this.state = IteratorState.NeedCurrent;
                    return true;

                case IteratorState.NeedCurrent:
                    // Move to next following node which matches
                    if (!this.filter.MoveToFollowing(this.navCurrent, this.navEnd)) {
                        // No more nodes unless ending node matches
                        if (filter.IsFiltered(this.navEnd)) {
                            this.state = IteratorState.NoNext;
                            return false;
                        }

                        this.navCurrent.MoveTo(this.navEnd);
                        this.state = IteratorState.NoNext;
                    }
                    return true;

                case IteratorState.HaveCurrentNoNext:
                    this.state = IteratorState.NoNext;
                    return true;
            }

            Debug.Assert(this.state == IteratorState.NoNext, "Illegal state: " + this.state);
            return false;
        }
NodeRangeIterator