public static Semaforo setInstance(string key) { //set { if (hsTable.ContainsKey(key)) { instance = (Semaforo)hsTable[key]; instance = null; hsTable.Remove(key); } return(instance); //} }
public static Semaforo getInstance(string key) { //get //{ if (!hsTable.ContainsKey(key)) { instance = new Semaforo(); hsTable[key] = instance; } else { instance = (Semaforo)hsTable[key]; } return(instance); //} }