Пример #1
0
 public void Detach(IBotObserver botObserver)
 {
     if (_observers.Contains(botObserver))
     {
         _observers.Remove(botObserver);
     }
 }
Пример #2
0
 public void Attach(IBotObserver botObserver)
 {
     if (_observers.Contains(botObserver) == false)
     {
         _observers.Add(botObserver);
     }
 }
Пример #3
0
        public ObserverTestBot(string command, IBotObserver botObserver)
        {
            Command    = command;
            _observers = new List <IBotObserver>();

            this.Attach(botObserver);
        }
Пример #4
0
 public void registerBotObserver(IBotObserver observer)
 {
     botObservers.Add(observer);
 }
Пример #5
0
 public void Detach(IBotObserver botObserver)
 {
     _observers.Remove(botObserver);
 }