Информация о стране.
Beispiel #1
0
        internal static Country FromJson(VkResponse response)
        {
            var country = new Country();

            country.Id = response["cid"] ?? response["id"];
            country.Title = response["title"] ?? response["name"];

            return country;
        }
Beispiel #2
0
        /// <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;
			}
Beispiel #4
0
		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);
				}
			}
		}
Beispiel #5
0
		public static IEnumerable<University> GetAllUnivercities(City city, Country country)
		{
			//TODO: Implement fetching all universities
			throw new NotImplementedException();
		}