private static void TraditionalObserver() { var subj = new TraditionalObs.StockTicker(); GoogleObserver gobs = new GoogleObserver(subj); MicrosoftObserver mobs = new MicrosoftObserver(subj); foreach (var s in SampleData.getNext()) { subj.Stock = s; } }
public GoogleObserver(StockTicker subject) { this.DataSource = subject; subject.Register(this); }
public MicrosoftObserver(StockTicker subject) { this.DataSource = subject; subject.Register(this); }