2002-04-12 Patrik Torstensson <patrik.torstensson@labs2.com>
[mono.git] / mcs / class / System.Web / System.Web / HttpStaticObjectsCollection.cs
1 using System;\r
2 using System.Collections;\r
3 \r
4 namespace System.Web {\r
5    public sealed class HttpStaticObjectsCollection : ICollection, IEnumerable {\r
6       private Hashtable _Objects;\r
7 \r
8       // Needs to hold object items that can be latebound and can be serialized\r
9       public HttpStaticObjectsCollection() {\r
10          _Objects = new Hashtable();\r
11       }\r
12 \r
13       public object GetObject(string name) {\r
14          return this[name];\r
15       }\r
16 \r
17       [MonoTODO()]\r
18       public IEnumerator GetEnumerator() {\r
19          throw new NotImplementedException();\r
20       }\r
21       \r
22       public void CopyTo(Array array, int index) {\r
23          IEnumerator Enum = GetEnumerator();\r
24          while (Enum.MoveNext()) {\r
25             array.SetValue(Enum.Current, ++index);\r
26          }\r
27       }   \r
28 \r
29       internal IDictionary GetObjects() {\r
30          return _Objects;\r
31       }\r
32 \r
33       [MonoTODO()]\r
34       public object this[string name] {\r
35          get {\r
36             throw new NotImplementedException();\r
37          }\r
38       }\r
39 \r
40       public int Count {\r
41          get {\r
42             return _Objects.Count;\r
43          }\r
44       }\r
45 \r
46       public bool IsReadOnly {\r
47          get {\r
48             return true;\r
49          }\r
50       }\r
51 \r
52       public bool IsSynchronized {\r
53          get {\r
54             return false;\r
55          }\r
56       }\r
57 \r
58       public object SyncRoot {\r
59          get {\r
60             return this;\r
61          }\r
62       }\r
63    }\r
64 }\r