XmlNodeList.cs 1023 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. using System;
  2. using System.Collections;
  3. namespace System.Xml
  4. {
  5. /// <summary>
  6. /// Abstract class XmlNodeList.
  7. /// </summary>
  8. public abstract class XmlNodeList : IEnumerable
  9. {
  10. // public properties
  11. public abstract int Count { get; }
  12. [System.Runtime.CompilerServices.IndexerName("ItemOf")]
  13. public virtual XmlNode this[int i]
  14. {
  15. get
  16. {
  17. throw new NotImplementedException("XmlNodeList indexer must be implemented by derived class.");
  18. }
  19. }
  20. // Public Methods
  21. /// <summary>
  22. /// Abstract. Return the enumerator for the class.
  23. /// </summary>
  24. /// <returns>Enumerator</returns>
  25. public abstract IEnumerator GetEnumerator();
  26. /// <summary>
  27. /// Abstract. Returns the item at index. Index is 0-based.
  28. /// </summary>
  29. /// <param name="index"></param>
  30. /// <returns></returns>
  31. public abstract XmlNode Item(int index);
  32. public XmlNodeList()
  33. {
  34. // TODO: What should be done in constructor for XmlNodeList.XmlNodeList()? (nothing)
  35. }
  36. }
  37. }