Esempio n. 1
0
        public void PrintStatistics(SWeatherInfo data)
        {
            UpdateStatistics(data);

            Console.WriteLine($"Temperature: {GetSpesificStatistics(_temperatureData)}");
            Console.WriteLine($"Humidity: {GetSpesificStatistics(_humidityData)}");
            Console.WriteLine($"Pressure: {GetSpesificStatistics(_pressureData)}");

            if (data.windInfo != null)
            {
                UpdateWindStatistics(data);

                Console.WriteLine($"Wind: {GetSpesificStatistics(_windSpeed)}");
                Console.WriteLine($"{GetDirectionStatistics(_windDirection)}");
            }
            Console.WriteLine("----------------");
        }
Esempio n. 2
0
 private void UpdateWindStatistics(SWeatherInfo data)
 {
     _windSpeed.UpdateData(data.windInfo.Value.speed);
     _windDirection.UpdateDirectionData(data.windInfo.Value.direction);
 }
Esempio n. 3
0
 private void UpdateStatistics(SWeatherInfo data)
 {
     _temperatureData.UpdateData(data.temperature);
     _humidityData.UpdateData(data.humidity);
     _pressureData.UpdateData(data.pressure);
 }