Esempio n. 1
0
        public static Semaforo setInstance(string key)
        {
            //set {
            if (hsTable.ContainsKey(key))
            {
                instance = (Semaforo)hsTable[key];
                instance = null;
                hsTable.Remove(key);
            }
            return(instance);

            //}
        }
Esempio n. 2
0
        public static Semaforo getInstance(string key)
        {
            //get
            //{

            if (!hsTable.ContainsKey(key))
            {
                instance     = new Semaforo();
                hsTable[key] = instance;
            }
            else
            {
                instance = (Semaforo)hsTable[key];
            }
            return(instance);
            //}
        }