Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System.Xml / System / Xml / XPath / Internal / DocumentorderQuery.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="DocumentOrderQuery.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>                                                                
5 // <owner current="true" primary="true">Microsoft</owner>
6 //------------------------------------------------------------------------------
7
8 namespace MS.Internal.Xml.XPath {
9     using System;
10     using System.Xml;
11     using System.Xml.XPath;
12     using System.Diagnostics;
13
14     internal sealed class DocumentOrderQuery : CacheOutputQuery {
15         
16         public DocumentOrderQuery(Query qyParent) : base(qyParent) {}
17         private DocumentOrderQuery(DocumentOrderQuery other) : base(other) { }        
18         
19         public override object Evaluate(XPathNodeIterator context) {
20             base.Evaluate(context);
21
22             XPathNavigator node;
23             while ((node = base.input.Advance()) != null) {
24                 Insert(outputBuffer, node);
25             }
26
27             return this;
28         }
29
30         public override XPathNavigator MatchNode(XPathNavigator context) {
31             return input.MatchNode(context);
32         }
33
34         public override XPathNodeIterator Clone() { return new DocumentOrderQuery(this); }
35     }
36 }
37
38
39
40
41