Welcome to mirror list, hosted at ThFree Co, Russian Federation.

XmlSchemaCollection.cs « System.Xml.Schema « System.XML « class « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: c4ed836b0e1c72143f2a7fa9f2b2ac1b94ecaaf4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
// Author: Dwivedi, Ajay kumar
//            Adwiv@Yahoo.com
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; }
		}
	}
}