Add stock example on Observer pattern

This commit is contained in:
Petrutiu Mihai
2016-06-28 17:26:33 +03:00
parent 4a69b3da17
commit 5d639bf0ab
13 changed files with 262 additions and 34 deletions

View File

@@ -11,16 +11,16 @@ namespace ObserverPattern.Twits
{
TwitObservable observable = new TwitObservable();
TwitUser t100 = new TwitUser("t100", observable);
TwitUser r2d2 = new TwitUser("R2-D2", observable);
using (TwitUser t100 = new TwitUser("t100", observable))
using (TwitUser r2d2 = new TwitUser("R2-D2", observable))
{
t100.Twit("El chupacapra - BOOM BOOM");
t100.Twit("El chupacapra - BOOM BOOM");
r2d2.Twit("Vamos vamos mi amor");
r2d2.Twit("Vamos vamos mi amor");
t100.Dispose();
observable.ItsGoingHomeTime();
observable.ItsGoingHomeTime();
}
}
}
}