XmlAnyElementAttributes.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // XmlAnyElementAttributes.cs:
  3. //
  4. // Author:
  5. // John Donagher ([email protected])
  6. //
  7. // (C) 2002 John Donagher
  8. //
  9. using System.Xml;
  10. using System.Xml.Serialization;
  11. using System.Collections;
  12. using System;
  13. namespace System.Xml.Serialization
  14. {
  15. /// <summary>
  16. /// Summary description for XmlAnyElementAttributes.
  17. /// </summary>
  18. public class XmlAnyElementAttributes : CollectionBase
  19. {
  20. public XmlAnyElementAttribute this[int index]
  21. {
  22. get
  23. {
  24. return (XmlAnyElementAttribute)List[index];
  25. }
  26. set
  27. {
  28. List[index] = value;
  29. }
  30. }
  31. public int Add(XmlAnyElementAttribute attribute)
  32. {
  33. return List.Add(attribute);
  34. }
  35. public bool Contains(XmlAnyElementAttribute attribute)
  36. {
  37. return List.Contains(attribute);
  38. }
  39. public int IndexOf(XmlAnyElementAttribute attribute)
  40. {
  41. return List.IndexOf(attribute);
  42. }
  43. public void Insert(int index, XmlAnyElementAttribute attribute)
  44. {
  45. List.Insert(index, attribute);
  46. }
  47. public void Remove(XmlAnyElementAttribute attribute)
  48. {
  49. List.Remove(attribute);
  50. }
  51. public void CopyTo(XmlAnyElementAttribute[] array,int index)
  52. {
  53. List.CopyTo(array, index);
  54. }
  55. internal bool InternalEquals (XmlAnyElementAttributes other)
  56. {
  57. if (other == null) return false;
  58. if (Count != other.Count) return false;
  59. for (int n=0; n<Count; n++)
  60. if (!this[n].InternalEquals (other[n])) return false;
  61. return true;
  62. }
  63. }
  64. }