mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-18 03:51:19 -10:00
System.Xml:
* XmlDocumentNavigator.cs: implement Clone()
* XmlElement.cs: remove bogus unimplemented override of InnerText
* XmlNode.cs: implment SelectNodes/SelectSingleNode
* XmlNodeArrayList.cs: new support class for SelectNodes
System.Xml.Xsl:
* XsltContext.cs: added 'PreserveWhitespace' abstract method
System.Xml.XPath:
* XPathNavigator.cs: implement:
- Compile
- Evaluate
- Clone
- Select
- ToString
- some forwarding methods
* XPathNodeIterator: implement caching Count
* Tokenizer.cs: new XPath tokenizer
* Parser.jay: new XPath grammar
* Parser.cs: new precompiled XPath grammar
* Expression.cs: new XPath expression objects
* Iterator.cs: new XPath result/context objects
* DefaultContext.cs: new XPath function binding context
svn path=/trunk/mcs/; revision=5421
64 lines
923 B
C#
64 lines
923 B
C#
//
|
|
// 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;
|
|
|
|
#region Constructor
|
|
|
|
protected XPathNodeIterator ()
|
|
{
|
|
}
|
|
|
|
#endregion
|
|
|
|
#region Properties
|
|
|
|
public virtual int Count
|
|
{
|
|
get
|
|
{
|
|
if (_count == 0)
|
|
{
|
|
// 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
|
|
}
|
|
}
|