public void GetWeatherByCoordinates(CityCoordinate coordinate, Action <WeatherObject, WebException> eventHandler) { CityObject city = new CityObject(null, null, coordinate); if (eventHandler != null) { if (city != null) { _openWeatherHttpRequest.GetWeatherWebRequests(city, eventHandler); } else { eventHandler(null, new WebException("City is null")); } } }
public CityObject(string id, string name, CityCoordinate coordinates) : base() { this.Id = id; this.Name = name; this.Coordinates = coordinates; }