using System; using System.Collections.Generic; using System.Text; namespace HotelPms.Share.Util { /// ****************************** Description ******************************* /// žƒVƒXƒeƒ€–¼Ì /// @”Ä—pƒNƒ‰ƒX /// žŠT—v /// @ƒVƒXƒeƒ€‹¤’ʕϐ”Ši”[—p /// ž—š—ð /// @20070803 ¬–؁@Ÿ—´ V‹Kì¬ /// ****************************** Declarations ****************************** public class SystemStorage { private static SystemStorage? systemStorage; private Dictionary dictionary; public SystemStorage() { dictionary = new Dictionary(); } ~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 { } } } }