Esempio n. 1
0
 /// <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(ILogAnnotationComponentListener l)
 {
     if (m_listeners.Contains(l))
     {
         m_listeners.Remove(l);
         return(true);
     }
     return(false);
 }
Esempio n. 2
0
 /// <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(ILogAnnotationComponentListener l)
 {
     if (!m_listeners.Contains(l))
     {
         m_listeners.Add(l);
         return(true);
     }
     return(false);
 }