public static void RemoveServiceHandler(int stype, CtypeEventHandler handler) { if (HandlerDic.ContainsKey(stype)) { HandlerDic[stype] -= handler; } else { HandlerDic.Remove(stype); } }
public void RegisterServiceHandler(int stype, CtypeEventHandler handler) { if (HandlerDic.ContainsKey(stype)) { HandlerDic[stype] += handler; } else { HandlerDic.Add(stype, handler); } }