XmlArrayItemAttributes.cs 1.4 KB

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