1 //------------------------------------------------------------------------------
2 // <copyright file="ForwardPositionQuery.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // <owner current="true" primary="true">Microsoft</owner>
6 //------------------------------------------------------------------------------
8 namespace MS.Internal.Xml.XPath {
11 using System.Xml.XPath;
12 using System.Diagnostics;
14 internal class ForwardPositionQuery : CacheOutputQuery {
16 public ForwardPositionQuery(Query input) : base(input) {
17 Debug.Assert(input != null);
19 protected ForwardPositionQuery(ForwardPositionQuery other) : base(other) { }
21 public override object Evaluate(XPathNodeIterator context) {
22 base.Evaluate(context);
25 while ((node = base.input.Advance()) != null) {
26 outputBuffer.Add(node.Clone());
32 public override XPathNavigator MatchNode(XPathNavigator context) {
33 return input.MatchNode(context);
36 public override XPathNodeIterator Clone() { return new ForwardPositionQuery(this); }