internal static City FromJson(VkResponse response) { var city = new City(); VkResponse id = response["cid"] ?? response["id"]; city.Id = Convert.ToInt64(id.ToString()); city.Title = response["title"] ?? response["name"]; city.Area = response["area"]; city.Region = response["region"]; city.Important = response["important"] ?? false; return city; }
public CityViewModel(City city) { City = city; }
public static IEnumerable<University> GetTopUniversities(City city, Country country) { while (true) { try { return App.VkApi.Database.GetUniversities(Convert.ToInt32(country.Id), Convert.ToInt32(city.Id)); } catch (UserAuthorizationFailException) { App.RequestAuth(); } catch (TooManyRequestsException) { Thread.Sleep(250); } } }
public static IEnumerable<University> GetAllUnivercities(City city, Country country) { //TODO: Implement fetching all universities throw new NotImplementedException(); }