Пример #1
0
 public void RemoveListener(TAction action)
 {
     this.listeners.Remove(action);
     if (WindowSystem.IsDebugWeakReferences() == true)
     {
         SimpleEventDebug.RemoveListener(action as System.Action);
     }
 }
Пример #2
0
        public void RemoveAllListeners()
        {
            if (WindowSystem.IsDebugWeakReferences() == true)
            {
                foreach (var action in this.listeners)
                {
                    SimpleEventDebug.RemoveListener(action as System.Action);
                }
            }

            this.listeners.Clear();
        }
Пример #3
0
        public void AddListener(TAction action)
        {
            if (action == null)
            {
                return;
            }

            this.listeners.Add(action);
            if (WindowSystem.IsDebugWeakReferences() == true)
            {
                SimpleEventDebug.AddListener(action as System.Action);
            }
        }