forked from abishekaditya/DesignPatterns
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
Latest commit
19 lines (17 loc) · 533 Bytes
/
Copy pathProgram.cs
File metadata and controls
19 lines (17 loc) · 533 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
namespaceObserverPattern
{
staticclassProgram
{
staticvoidMain()
{
varprovider=newWeatherSupplier();
varobserver1=newWeatherMonitor("TP");
varobserver2=newWeatherMonitor("H");
provider.WeatherConditions(32.0,0.05,1.5);
observer1.Subscribe(provider);
provider.WeatherConditions(33.5,0.04,1.7);
observer2.Subscribe(provider);
provider.WeatherConditions(37.5,0.07,1.2);
}
}
}