System.Xml.Xsl.Runtime.XmlNavigatorStack.Peek C# (CSharp) Method

Peek() public method

Returns the navigator at the top of the stack without adjusting the stack pointer
public Peek ( ) : XPathNavigator
return System.Xml.XPath.XPathNavigator
        public XPathNavigator Peek() {
            Debug.Assert(!IsEmpty);
            return this.stkNav[this.sp - 1];
        }

Usage Example

Exemplo n.º 1
0
        public bool MoveNext()
        {
            if (!_navStack.IsEmpty)
            {
                while (true)
                {
                    // Move to the next matching node that is before the top node on the stack in document order
                    if (_filter.MoveToFollowing(_navCurrent, _navStack.Peek()))
                    {
                        // Found match
                        return(true);
                    }

                    // Do not include ancestor nodes as part of the preceding axis
                    _navCurrent.MoveTo(_navStack.Pop());

                    // No more preceding matches possible
                    if (_navStack.IsEmpty)
                    {
                        break;
                    }
                }
            }

            return(false);
        }
All Usage Examples Of System.Xml.Xsl.Runtime.XmlNavigatorStack::Peek