Exemplo n.º 1
0
Arquivo: City.cs Projeto: G-IT-ED/vk
        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;
        }
Exemplo n.º 2
0
			public CityViewModel(City city)
			{
				City = city;
			}
Exemplo n.º 3
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.º 4
0
		public static IEnumerable<University> GetAllUnivercities(City city, Country country)
		{
			//TODO: Implement fetching all universities
			throw new NotImplementedException();
		}