internal void RegisterEventListener(EventListener pListener) { Assert.CheckNull(pListener); CheckIfEventExist(pListener.Event); AddListener(pListener); }
public bool Equals(EventListener pOtherListener) { return Event == pOtherListener.Event && ListenerHashCode == pOtherListener.ListenerHashCode && Callback == pOtherListener.Callback; }
private void AddListener(EventListener pListener) { if (!ContainListener(pListener)) { mEventDictionnary[pListener.Event].Add(pListener); } }
private void UnregisterEventListener(EventListener pListener) { if (pListener != null) { pListener.Dispose(); pListener = null; } }
private bool ContainListener(EventListener pListener) { Assert.CheckNull(pListener); return (mEventDictionnary[pListener.Event].FirstOrDefault((eventListener) => { return eventListener.Equals(pListener); }) != null); }