1 //------------------------------------------------------------------------------
2 // <copyright file="XmlNodeList.cs" company="Microsoft">
3 // Copyright (c) Microsoft Corporation. All rights reserved.
5 // <owner current="true" primary="true">Microsoft</owner>
6 //------------------------------------------------------------------------------
9 using System.Collections;
11 // Represents an ordered collection of nodes.
12 public abstract class XmlNodeList: IEnumerable, IDisposable {
14 // Retrieves a node at the given index.
15 public abstract XmlNode Item(int index);
17 // Gets the number of nodes in this XmlNodeList.
18 public abstract int Count { get;}
20 // Provides a simple ForEach-style iteration over the collection of nodes in
22 public abstract IEnumerator GetEnumerator();
24 // Retrieves a node at the given index.
25 [System.Runtime.CompilerServices.IndexerName ("ItemOf")]
26 public virtual XmlNode this[int i] { get { return Item(i);}}
28 void IDisposable.Dispose()
30 PrivateDisposeNodeList();
33 protected virtual void PrivateDisposeNodeList() { }