| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- //
- // System.Xml.XPath.XPathNodeIterator
- //
- // Author:
- // Jason Diamond ([email protected])
- //
- // (C) 2002 Jason Diamond http://injektilo.org/
- //
- using System;
- namespace System.Xml.XPath
- {
- public abstract class XPathNodeIterator : ICloneable
- {
- private int _count = -1;
- #region Constructor
- protected XPathNodeIterator ()
- {
- }
- #endregion
- #region Properties
- public virtual int Count
- {
- get
- {
- if (_count == -1)
- {
- // compute and cache the count
- XPathNodeIterator tmp = Clone ();
- while (tmp.MoveNext ())
- ;
- _count = tmp.CurrentPosition;
- }
- return _count;
- }
- }
- public abstract XPathNavigator Current { get; }
- public abstract int CurrentPosition { get; }
- #endregion
- #region Methods
- public abstract XPathNodeIterator Clone ();
- object ICloneable.Clone ()
- {
- return Clone ();
- }
- public abstract bool MoveNext ();
-
- #endregion
- }
- }
|