Exemplo n.º 1
0
        /// <summary>
        /// Removes asynchronous command listener.
        ///
        /// <param name="listener">the listener</param>
        /// <returns>true if listener did not already exist.</returns>
        /// </summary>
        public bool RemoveAsynchronousCommandListener(IAsynchronousCommandListener listener)
        {
            bool result;

            lock (_asynchrounsCommandListeners)
            {
                result = _asynchrounsCommandListeners.Remove(listener);
            }
            return(result);
        }
Exemplo n.º 2
0
 /// <summary>
 /// Adds asynchronous command listener.
 ///
 /// <param name="listener">the listener</param>
 /// <returns>true if listener did not already exist.</returns>
 /// </summary>
 public bool AddAsynchronousCommandListener(IAsynchronousCommandListener listener)
 {
     lock (_asynchrounsCommandListeners)
     {
         if (_asynchrounsCommandListeners.Contains(listener) == false)
         {
             _asynchrounsCommandListeners.Add(listener);
             return(true);
         }
     }
     return(false);
 }
Exemplo n.º 3
0
 public void AddAsynchronousCommandListener(IAsynchronousCommandListener asynchronousCommandListener)
 {
     _commandInterface.AddAsynchronousCommandListener(asynchronousCommandListener);
 }