Информация о стране.
Exemplo n.º 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;
        }
Exemplo n.º 2
0
Arquivo: Country.cs Projeto: vknet/vk
        /// <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;
        }
Exemplo n.º 3
0
			public CountryViewModel(Country country)
			{
				Country = country;
			}
Exemplo n.º 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);
				}
			}
		}
Exemplo n.º 5
0
		public static IEnumerable<University> GetAllUnivercities(City city, Country country)
		{
			//TODO: Implement fetching all universities
			throw new NotImplementedException();
		}