void client_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e) { var results = JsonConvert.DeserializeObject <GeoSearch>(e.Result.ToString().Trim()); CitiesLoaded eventHandler = success; if (eventHandler != null) { eventHandler(results); } }
private void SaveCities(Task <IEnumerable <CityDTO> > newCities) { Cities = newCities.Result.ToArray(); logger.Info($"Городов загружено : { Cities.Length }"); CitiesLoaded?.Invoke(); }
private void SaveCities(Task <List <OsmCity> > newCities) { Cities = newCities.Result.ToArray(); logger.Info($"Городов загружено : {Cities.Length}"); CitiesLoaded?.Invoke(); }