/// <summary> /// Remove an already registered listener which we considered each time this object is modified /// </summary> /// <param name="l">the object to stop calling on events</param> /// <returns>true if this listener was already added. Otherwise, the function returns false and nothing is done</returns> public bool RemoveListener(ILogAnnotationContainerListener l) { if (m_listeners.Contains(l)) { m_listeners.Remove(l); return(true); } return(false); }
/// <summary> /// Add a listener to consider each time this object is modified /// </summary> /// <param name="l">the object to call on events</param> /// <returns> true if this listener was not already added. Otherwise, the function returns false and the object is not added</returns> public bool AddListener(ILogAnnotationContainerListener l) { if (!m_listeners.Contains(l)) { m_listeners.Add(l); return(true); } return(false); }