1 //------------------------------------------------------------------------------
2 // <copyright file="ResetableIterator.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;
13 using System.Globalization;
15 internal abstract class ResetableIterator : XPathNodeIterator {
16 // the best place for this constructors to be is XPathNodeIterator, to avoid DCR at this time let's ground them here
17 public ResetableIterator() {
20 protected ResetableIterator(ResetableIterator other) {
21 base.count = other.count;
23 protected void ResetCount() {
27 public abstract void Reset();
28 public virtual bool MoveToPosition(int pos) {
30 for(int i = CurrentPosition; i < pos ; i ++) {
38 // Contruct extension: CurrentPosition should return 0 if MoveNext() wasn't called after Reset()
39 // (behavior is not defined for XPathNodeIterator)
40 public abstract override int CurrentPosition { get; }