Files
mono/mcs/class/System.XML/System.Xml.Schema/XmlSchemaCollection.cs
T
Ajay kumar Dwivedi b0729d1659 2002-06-18 Dwivedi, Ajay kumar <[email protected]>
* XmlSchema: The Read and Write methods are no more [MonoTODO] :)

	* XmlSchemaAppInfo: Xml Markup is now being read.

	* XmlSchemaDocumentation: Xml Markup is now being read.

	* All: Unhandled attributes are being handled properly.

	* All: Reordered the properties in all cs files to match with MS
	       Implementation. This was required since the order is importatnt
	       for the XmlSerializer.

svn path=/trunk/mcs/; revision=5322
2002-06-18 10:47:40 +00:00

119 lines
2.2 KiB
C#
Executable File

// Author: Dwivedi, Ajay kumar
// [email protected]
using System;
using System.Collections;
using System.Xml;
namespace System.Xml.Schema
{
/// <summary>
/// Summary description for XmlSchemaCollection.
/// </summary>
public sealed class XmlSchemaCollection : ICollection, IEnumerable
{
//private fields
private Hashtable htable;
private XmlNameTable ntable;
[MonoTODO]
public XmlSchemaCollection()
{
htable = new Hashtable();
ntable = new NameTable();
}
public XmlSchemaCollection(XmlNameTable nametable)
{
htable = new Hashtable();
ntable = nametable;
}
//properties
public int Count
{
get
{
return this.htable.Count;
}
}
public XmlNameTable NameTable
{
get
{
return this.ntable;
}
}
public XmlSchema this[ string ns ]
{
get
{
return (XmlSchema) this.htable[ns];
}
}
// Events
public event ValidationEventHandler ValidationEventHandler;
// Methods
[MonoTODO]
public XmlSchema Add(string ns, XmlReader reader)
{
return null;
}
[MonoTODO]
public XmlSchema Add(string ns, string uri)
{
return null;
}
[MonoTODO]
public XmlSchema Add(XmlSchema schema)
{
return null;
}
public void Add(XmlSchemaCollection schema)
{
XmlSchemaCollectionEnumerator xenum = schema.GetEnumerator();
while(xenum.MoveNext())
{
this.Add(xenum.Current);
}
}
public bool Contains(string ns)
{
return this.htable.Contains(ns);
}
public bool Contains(XmlSchema schema)
{
return this.htable.Contains(schema.TargetNamespace);
}
public void CopyTo(XmlSchema[] array, int index)
{
}
public XmlSchemaCollectionEnumerator GetEnumerator()
{
return new XmlSchemaCollectionEnumerator(this.htable);
}
//assembly Methods
[MonoTODO]
void ICollection.CopyTo(Array array, int index)
{
}
bool ICollection.IsSynchronized
{
get { return false; }
}
IEnumerator IEnumerable.GetEnumerator()
{
return this.htable.GetEnumerator();
}
Object ICollection.SyncRoot
{
get { return this; }
}
}
}