Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System.Xml / System / Xml / Dom / XmlNodeList.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="XmlNodeList.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>                                                                
5 // <owner current="true" primary="true">Microsoft</owner>
6 //------------------------------------------------------------------------------
7
8 namespace System.Xml {
9     using System.Collections;
10
11     // Represents an ordered collection of nodes.
12     public abstract class XmlNodeList: IEnumerable, IDisposable {
13
14         // Retrieves a node at the given index.
15         public abstract XmlNode Item(int index);
16
17         // Gets the number of nodes in this XmlNodeList.
18         public abstract int Count { get;}
19
20         // Provides a simple ForEach-style iteration over the collection of nodes in
21         // this XmlNodeList.
22         public abstract IEnumerator GetEnumerator();
23
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);}}
27
28         void IDisposable.Dispose()
29         {
30             PrivateDisposeNodeList();
31         }
32
33         protected virtual void PrivateDisposeNodeList() { }
34     }
35 }
36