Updates referencesource to .NET 4.7
[mono-project.git] / mcs / class / referencesource / System.Xml / System / Xml / XPath / Internal / XPathSelfQuery.cs
blob33f932c26f7feb487b20edad332ff09bb1706a4c
1 //------------------------------------------------------------------------------
2 // <copyright file="XPathSelfQuery.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;
14 internal sealed class XPathSelfQuery : BaseAxisQuery {
15 public XPathSelfQuery(Query qyInput, string Name, string Prefix, XPathNodeType Type) : base(qyInput, Name, Prefix, Type) {}
16 private XPathSelfQuery(XPathSelfQuery other) : base(other) { }
18 public override XPathNavigator Advance() {
19 while ((currentNode = qyInput.Advance()) != null) {
20 if (matches(currentNode)) {
21 position = 1;
22 return currentNode;
25 return null;
28 public override XPathNodeIterator Clone() { return new XPathSelfQuery(this); }