public void RemoveListener(TAction action) { this.listeners.Remove(action); if (WindowSystem.IsDebugWeakReferences() == true) { SimpleEventDebug.RemoveListener(action as System.Action); } }
public void RemoveAllListeners() { if (WindowSystem.IsDebugWeakReferences() == true) { foreach (var action in this.listeners) { SimpleEventDebug.RemoveListener(action as System.Action); } } this.listeners.Clear(); }
public void AddListener(TAction action) { if (action == null) { return; } this.listeners.Add(action); if (WindowSystem.IsDebugWeakReferences() == true) { SimpleEventDebug.AddListener(action as System.Action); } }