XmlAnyElementAttributes.cs 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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 void AddKeyHash (System.Text.StringBuilder sb)
  56. {
  57. if (Count == 0) return;
  58. sb.Append ("XAEAS ");
  59. for (int n=0; n<Count; n++)
  60. this[n].AddKeyHash (sb);
  61. sb.Append ('|');
  62. }
  63. }
  64. }