/// <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); }
/// <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); }
public void AddAsynchronousCommandListener(IAsynchronousCommandListener asynchronousCommandListener) { _commandInterface.AddAsynchronousCommandListener(asynchronousCommandListener); }