using System;
using System.Collections;

namespace HISClinic.UIProcess
{
	/// <summary>
	/// CacheData 的摘要说明。
	/// </summary>
	public class CacheDataManager
	{
		private static Hashtable _CacheData;
		static CacheDataManager()
		{
			//
			// TODO: 在此处添加构造函数逻辑
			//

			_CacheData=new Hashtable();
		}		

		public static void SetCacheData(object Key,object Value)
		{
			if(_CacheData[Key] == null)
			{
				_CacheData.Add(Key,Value);
			}
			else
			{
				_CacheData[Key]=Value;
			}
		}

		public static void Remove(object Key)
		{
			_CacheData.Remove(Key);
		}

		public static object GetCacheData(object Key)
		{
			return _CacheData[Key];
		}

		~ CacheDataManager()
		{
			_CacheData.Clear();
			_CacheData=null;
		}
	}
}
