Exemplo n.º 1
0
        // This methods allows classes to unregister for LearningEvents
        public virtual void removeListener(LearningEventListener listener)
        {
            lock (this)
            {
                if (listener == null)
                {
                    throw new System.ArgumentException("listener is null!");
                }

                listeners.Remove(listener);
            }
        }
Exemplo n.º 2
0
        // This methods allows classes to register for LearningEvents
        public virtual void addListener(LearningEventListener listener)
        {
            lock (this)
            {
                if (listener == null)
                {
                    throw new System.ArgumentException("listener is null!");
                }

                if (!listeners.Contains(listener))
                {
                    listeners.Add(listener);
                }
            }
        }