internal static Country FromJson(VkResponse response) { var country = new Country(); country.Id = response["cid"] ?? response["id"]; country.Title = response["title"] ?? response["name"]; return country; }
/// <summary> /// Разобрать из json. /// </summary> /// <param name="response">Ответ сервера.</param> /// <returns></returns> public static Country FromJson(VkResponse response) { var country = new Country { Id = response["comment_id"] ?? response["cid"] ?? response["id"], Title = response["title"] ?? response["name"] }; return country; }
public CountryViewModel(Country country) { Country = country; }
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(); }