using System;
|
using System.Collections.Generic;
|
using System.Text;
|
|
namespace HotelPms.Share.Util
|
{
|
/// ****************************** Description *******************************
|
/// VXe¼Ì
|
/// @ÄpNX
|
/// Tv
|
/// @VXe¤ÊÏi[p
|
/// ð
|
/// @20070803 ¬Ø@´ VKì¬
|
/// ****************************** Declarations ******************************
|
public class SystemStorage
|
{
|
private static SystemStorage? systemStorage;
|
private Dictionary<string,object> dictionary;
|
|
public SystemStorage()
|
{
|
dictionary = new Dictionary<string, object>();
|
}
|
|
~SystemStorage()
|
{
|
dictionary.Clear();
|
}
|
|
public static SystemStorage Instance()
|
{
|
if (systemStorage == null)
|
{
|
systemStorage = new SystemStorage();
|
}
|
return systemStorage;
|
}
|
|
public void SetItem(string key, object value)
|
{
|
dictionary.Add(key, value);
|
}
|
|
public bool ContainsKey(string key)
|
{
|
return dictionary.ContainsKey(key);
|
}
|
|
public object GetItem(string key)
|
{
|
return dictionary[key];
|
}
|
|
public void ReMoveItem(string key)
|
{
|
try
|
{
|
dictionary.Remove(key);
|
}
|
catch
|
{
|
}
|
}
|
|
public void ReMoveAll()
|
{
|
try
|
{
|
dictionary.Clear();
|
}
|
catch
|
{
|
}
|
}
|
}
|
}
|