Example #1
0
 /// <summary>Initializes a new instance of the <see cref="WeatherStationEventArgs"/> class.</summary>
 /// <param name="currentData">The current data.</param>
 /// <param name="previousData">The previous data.</param>
 /// <exception cref="ArgumentNullException">Thrown when currentData or previousData is null.</exception>
 public WeatherStationEventArgs(WeatherData currentData, WeatherData previousData)
 {
     this.CurrentData  = currentData ?? throw new ArgumentNullException(nameof(currentData));
     this.PreviousData = previousData ?? throw new ArgumentNullException(nameof(previousData));
 }
Example #2
0
 /// <summary>Initializes a new instance of the <see cref="WeatherStation"/> class.</summary>
 public WeatherStation()
 {
     this.observers    = new List <IObserver>();
     this.currentData  = new WeatherData();
     this.previousData = new WeatherData();
 }