public void MeasurementsChange(int temperature, int humidity, int pressure)
        {
            var WeatherInfoEventArgs = new WeatherInfoEventArgs()
            {
                Humidity    = humidity,
                Temperature = temperature,
                Pressure    = pressure
            };

            OnWeatherInfoEventHandler(WeatherInfoEventArgs);
        }
Example #2
0
 private void SendCurrentConditionsReport(object sender, WeatherInfoEventArgs eventArgs) => Console.WriteLine($"CurrentConditionsReport report: \n {eventArgs.Humidity} \n {eventArgs.Pressure} \n {eventArgs.Temperature}");
 private void OnWeatherInfoEventHandler(WeatherInfoEventArgs e)
 {
     WeatherInfoEventHandler?.Invoke(this, e);
 }
 private void SendStatisticReport(object sender, WeatherInfoEventArgs eventArgs) => Console.WriteLine($"Statistic report: \n {eventArgs.Humidity} \n {eventArgs.Pressure} \n {eventArgs.Temperature}");