public void TraditionalTest() { // Monitor a stock ticker, when particular events occur, react OT.StockTicker subject = new OT.StockTicker(); // Create New observers to listen to the stock ticker subject.Register(new OT.GoogleObserver()); subject.Register(new OT.MicrosoftObserver()); // Load the Sample Stock Data foreach (var s in SampleData.getNext()) { subject.Stock = s; } }
public MicrosoftObserver(StockTicker subj) { this.DataSource = subj; subj.Register(this); }