Exemplo n.º 1
0
        public static async Task <IList <City> > GetHasHistoricalSightAsync()
        {
            var rest   = new CityRest();
            var cities = await rest.GetHasHistoricalSightAsync() ?? GetLocalCities();

            SetLocalCities(cities);
            return(cities);
        }
Exemplo n.º 2
0
        public async Task <IList <City> > GetHasHistoricalSightAsync()
        {
            var service = new CityRest();
            var items   = await service.GetHasHistoricalSightAsync();

            ApplicationManager <string> .AddOrUpdate("cities", items);

            return(items.OrderBy(o => o.Name).ToList());
        }
Exemplo n.º 3
0
        public static async Task <IList <City> > GetHasHistoricalSightAsync()
        {
            var rest = new CityRest();

            var result = await rest.GetHasHistoricalSightAsync();

            if (result.IsValid)
            {
                SetLocalCities(result.Value);
                return(result.Value);
            }
            else
            {
                return(GetLocalCities());
            }
        }