public void Run() { TwitObservable observable = new TwitObservable(); using (TwitUser t100 = new TwitUser("t100", observable)) using (TwitUser r2d2 = new TwitUser("R2-D2", observable)) { t100.Twit("El chupacapra - BOOM BOOM"); r2d2.Twit("Vamos vamos mi amor"); observable.ItsGoingHomeTime(); } }
public TwitUser(string name, TwitObservable twits) { Name = name; channel = twits.Subscribe(this); this.twits = twits; }