Ejemplo n.º 1
0
 public void Unregister(Model_StockMarketDisplay observer)
 {
     // remove the observer from list of observers
     this.listOfObservers.Remove(observer);
 }
Ejemplo n.º 2
0
 // the register method allows for an observer to register to the realTimeData so that they can implement the observer pattern and update accordingly
 public void Register(Model_StockMarketDisplay observer)
 {
     // add the observer to the list of observers
     this.listOfObservers.Add(observer);
     observer.Update(this);                      // call update to ensure everything is up to date
 }