private void UpdateBusses(Object model) { Console.WriteLine("Updating bus location"); foreach (var bus in Busses) { var location = _locationGetter.GetLocation(bus.Id); bus.Update(location); } }
public async Task <WeatherResult> GetWeatherByLocation(string locationQuery = null) { if (string.IsNullOrEmpty(locationQuery)) { var locationResult = await _locationGetter.GetLocation(); locationQuery = $"{locationResult.City}, {locationResult.Country}, {locationResult.Zipcode}"; } var result = await _weatherGetter.GetWeather(locationQuery); return(result); }