示例#1
0
 public Display(Observable <WeatherInfo> weatherStationInside, Observable <WeatherInfo> weatherStationOutside, int priority)
 {
     _weatherStationInside  = weatherStationInside;
     _weatherStationOutside = weatherStationOutside;
     _weatherStationInside.RegisterObserver(this, priority);
     _weatherStationOutside.RegisterObserver(this, priority);
 }
示例#2
0
 public StatsDisplay(Observable <WeatherInfo> weatherStationInside, Observable <WeatherInfo> weatherStationOutside, int priority)
 {
     _weatherStationInside  = weatherStationInside;
     _weatherStationOutside = weatherStationOutside;
     _weatherStationInside.RegisterObserver(this, priority);
     _weatherStationOutside.RegisterObserver(this, priority);
     _statsDisplayInfoDictionary.Add(_weatherStationInside, new StatsDisplayInfo());
     _statsDisplayInfoDictionary.Add(_weatherStationOutside, new StatsDisplayInfo());
 }