/// <summary>
 /// Add observer to observers list
 /// </summary>
 /// <param name="newObserver">observer to add</param>
 public void addObserver(Observer.Observer newObserver)
 {
     // Don't add observer if he is already exists in observer list
     if (!observers.Contains(newObserver))
     {
         observers.Add(newObserver);
     }
 }
Beispiel #2
0
 public void Notify()
 {
     Observer.Observer obs = (Observer.Observer)Activator.GetObject(typeof(Observer.Observer), "tcp://114.212.85.35:8089/Update", null);
     if (obs != null)
     {
         obs.Update();
     }
 }
 /// <summary>
 /// Remove observer from observers list
 /// </summary>
 /// <param name="observerToDelete">observer to delete</param>
 public void RemoveObserver(Observer.Observer observerToDelete)
 {
     observers.Remove(observerToDelete);
 }
Beispiel #4
0
 public void Attach(Observer.Observer observer)
 {
     _observers.Add(observer);
 }
Beispiel #5
0
 public void Detach(Observer.Observer observer)
 {
     _observers.Remove(observer);
 }
Beispiel #6
0
 private void Detach(Observer.Observer obser)
 {
 }
Beispiel #7
0
 private void Attach(Observer.Observer obser)
 {
 }
Beispiel #8
0
 public JobListener()
 {
     _observer = new Observer.Observer(this);
 }
Beispiel #9
0
 public MessageBus()
 {
     this._observer = new Observer.Observer();
 }