Updates referencesource to .NET 4.7
[mono-project.git] / mcs / class / referencesource / System.Xml / System / Xml / XPath / Internal / XPathChildIterator.cs
blob2ea63b69459cbcc981bec2ab1c780f9a8e1a2ed2
1 //------------------------------------------------------------------------------
2 // <copyright file="XPathChildIterator.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
4 // </copyright>
5 // <owner current="true" primary="true">Microsoft</owner>
6 //------------------------------------------------------------------------------
8 namespace MS.Internal.Xml.XPath {
9 using System;
10 using System.Xml;
11 using System.Xml.XPath;
12 using System.Diagnostics;
13 using System.Globalization;
15 internal class XPathChildIterator: XPathAxisIterator {
16 public XPathChildIterator(XPathNavigator nav, XPathNodeType type) : base(nav, type, /*matchSelf:*/false) {}
17 public XPathChildIterator(XPathNavigator nav, string name, string namespaceURI) : base(nav, name, namespaceURI, /*matchSelf:*/false) {}
18 public XPathChildIterator(XPathChildIterator it) : base(it) {}
20 public override XPathNodeIterator Clone() {
21 return new XPathChildIterator(this);
24 public override bool MoveNext() {
25 while ((first) ? nav.MoveToFirstChild() : nav.MoveToNext()) {
26 first = false;
27 if (Matches) {
28 position++;
29 return true;
32 return false;