2
0

XmlSchemaObjectCollection.cs 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. // Author: Dwivedi, Ajay kumar
  2. // [email protected]
  3. using System;
  4. using System.Collections;
  5. namespace System.Xml.Schema
  6. {
  7. /// <summary>
  8. /// Summary description for XmlSchemaObjectCollection.
  9. /// </summary>
  10. public class XmlSchemaObjectCollection : System.Collections.CollectionBase
  11. {
  12. private XmlSchemaObject parent;
  13. public XmlSchemaObjectCollection()
  14. {
  15. }
  16. public XmlSchemaObjectCollection(XmlSchemaObject parent)
  17. {
  18. this.parent = parent;
  19. }
  20. // Properties
  21. public virtual XmlSchemaObject this[ int index ]
  22. {
  23. get
  24. {
  25. return (XmlSchemaObject) this.List[index];
  26. }
  27. set
  28. {
  29. this.List[index] = value;
  30. }
  31. }
  32. // Methods
  33. public int Add(XmlSchemaObject item)
  34. {
  35. return this.List.Add(item);
  36. }
  37. public bool Contains(XmlSchemaObject item)
  38. {
  39. return this.List.Contains(item);
  40. }
  41. public void CopyTo(XmlSchemaObject[] array, int index)
  42. {
  43. this.List.CopyTo(array,index);
  44. }
  45. public new XmlSchemaObjectEnumerator GetEnumerator ()
  46. {
  47. return new XmlSchemaObjectEnumerator(this.List);
  48. }
  49. public int IndexOf(XmlSchemaObject item)
  50. {
  51. return this.List.IndexOf(item);
  52. }
  53. public void Insert(int index, XmlSchemaObject item)
  54. {
  55. this.List.Insert(index, item);
  56. }
  57. protected override void OnClear()
  58. {
  59. }
  60. protected override void OnInsert(int index,object item)
  61. {
  62. }
  63. protected override void OnRemove(int index,object item)
  64. {
  65. }
  66. protected override void OnSet(int index,object oldValue,object newValue)
  67. {
  68. }
  69. public void Remove(XmlSchemaObject item)
  70. {
  71. this.List.Remove(item);
  72. }
  73. }
  74. }