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


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