public WeatherReportViewModel(WeatherInfo weatherReport)
        {
            if (weatherReport == null)
            {
                return;
            }


            Temperature = $"{(int)weatherReport.TemperatureC}C";
            WindSpeed = $"{(int)weatherReport.WindSpeedKph} km/h";
            WindDirection = weatherReport.WindDirection;
        }
Esempio n. 2
0
 private void WeatherChanged(WeatherInfo weatherReport)
 {
     WeatherReport = weatherReport == null 
         ? null 
         : new WeatherReportViewModel(weatherReport);
 }