public void Remove(EVENTKEY _eventName) { if (m_eventListner.ContainsKey(_eventName)) { m_eventListner.Remove(_eventName); } }
public void Execute(EVENTKEY _eventName, object _objects) { if (m_eventListner.ContainsKey(_eventName)) { m_eventListner[_eventName].Invoke(_objects, null); } }
public void Register(EVENTKEY _eventName, System.EventHandler _del) { if (m_eventListner.ContainsKey(_eventName)) { m_eventListner.Remove(_eventName); m_eventListner[_eventName] = _del; return; } if (m_eventListner.ContainsKey(_eventName) == false) { m_eventListner.Add(_eventName, _del); } }
public void AddHandler(EVENTKEY key, EventNet handler) { m_dict[key] += handler; }
public void FireEvent(EVENTKEY key, SprotoTypeBase sp, long session) { m_dict[key]?.Invoke(sp, session); }