/// <summary> /// Retrieves a new weather report. /// </summary> /// <returns>The report coroutine.</returns> /// <param name="force">If set to <c>true</c> force.</param> private async Task GetReport(bool force, IProgress prog) { if (Ready) { await Request(location.Coord, force, prog); } currentWeather = weatherService.LastReport; if (currentWeather != null) { currentWeather.AtmosphericPressure.MaybeSet(ref weather.atmosphericPressure); currentWeather.CloudCover.MaybeSet(ref weather.cloudCover); currentWeather.Location.MaybeSet(ref weather.location); currentWeather.Humidity.MaybeSet(ref weather.humidity); currentWeather.Temperature.MaybeSet(ref weather.temperature); currentWeather.AtmosphericVisibility.MaybeSet(ref weather.visibility); currentWeather.WindDirection.MaybeSet(ref weather.windDirection); currentWeather.WindSpeed.MaybeSet(ref weather.windSpeed); } }
public DevicesDataController(IWeatherReport weatherReport) { _weatherReport = weatherReport; }