1 // Author: Dwivedi, Ajay kumar
\r
4 using System.Collections;
\r
8 namespace System.Xml.Schema
\r
11 /// Summary description for XmlSchemaCollection.
\r
13 public sealed class XmlSchemaCollection : ICollection, IEnumerable
\r
16 private Hashtable htable;
\r
17 private Hashtable uriTable;
\r
18 private XmlNameTable ntable;
\r
20 public XmlSchemaCollection()
\r
21 : this (new NameTable ())
\r
25 public XmlSchemaCollection(XmlNameTable nametable)
\r
27 htable = new Hashtable();
\r
28 uriTable = new Hashtable ();
\r
37 return this.htable.Count;
\r
40 public XmlNameTable NameTable
\r
47 public XmlSchema this[ string ns ]
\r
51 return (XmlSchema) this.htable[ns];
\r
56 public event ValidationEventHandler ValidationEventHandler;
\r
60 public XmlSchema Add(string ns, XmlReader reader)
\r
63 throw new ArgumentNullException ("reader");
\r
65 throw new NotImplementedException ();
\r
69 public XmlSchema Add(string ns, string uri)
\r
71 if (uri == null || uri == String.Empty)
\r
72 throw new ArgumentNullException ("uri");
\r
74 throw new NotImplementedException ();
\r
78 public XmlSchema Add(XmlSchema schema)
\r
81 throw new ArgumentNullException ("schema");
\r
83 throw new NotImplementedException ();
\r
86 public void Add(XmlSchemaCollection schema)
\r
89 throw new ArgumentNullException ("schema");
\r
91 foreach (XmlSchema s in schema)
\r
95 public bool Contains(string ns)
\r
97 return this.htable.Contains(ns);
\r
99 public bool Contains(XmlSchema schema)
\r
101 return this.htable.Contains(schema.TargetNamespace);
\r
103 public void CopyTo(XmlSchema[] array, int index)
\r
107 public XmlSchemaCollectionEnumerator GetEnumerator()
\r
109 return new XmlSchemaCollectionEnumerator(this.htable);
\r
114 void ICollection.CopyTo(Array array, int index)
\r
117 bool ICollection.IsSynchronized
\r
119 get { return false; }
\r
121 IEnumerator IEnumerable.GetEnumerator()
\r
123 return this.htable.GetEnumerator();
\r
125 Object ICollection.SyncRoot
\r
127 get { return this; }
\r