public static Context GetContext(string currentPage) { if (Map.ContainsKey(currentPage)) return Map[currentPage]; Context con = new Context(); Map.Add(currentPage, con); return con; }
public static void AddEventHandler(string key, Context.TriggerEvent _event) { if (eventMap.ContainsKey(key)) { eventMap[key].Enqueue(_event); } else { eventMap[key] = new Queue<Context.TriggerEvent>(); eventMap[key].Enqueue(_event); } }