/** * DotGNU.Net.HttpApplicationState * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ using System; using System.Collections; namespace System.Web { public sealed class HttpStaticObjectsCollection : ICollection, IEnumerable { private Hashtable _Objects; // Needs to hold object items that can be latebound and can be serialized public HttpStaticObjectsCollection() { _Objects = new Hashtable(); } public object GetObject(string name) { return this[name]; } public IEnumerator GetEnumerator() { return _Objects.GetEnumerator (); } public void CopyTo(Array array, int index) { _Objects.CopyTo (array, index); } internal IDictionary GetObjects() { return _Objects; } public object this[string name] { get { return _Objects [name]; } } public int Count { get { return _Objects.Count; } } public bool IsReadOnly { get { return true; } } public bool IsSynchronized { get { return false; } } public object SyncRoot { get { return this; } } } }