/// <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); } }
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); }
public void Attach(Observer.Observer observer) { _observers.Add(observer); }
public void Detach(Observer.Observer observer) { _observers.Remove(observer); }
private void Detach(Observer.Observer obser) { }
private void Attach(Observer.Observer obser) { }
public JobListener() { _observer = new Observer.Observer(this); }
public MessageBus() { this._observer = new Observer.Observer(); }