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