public async Task GetSchedule(bool isUserInitiated)
        {
            var client = new ServiceClient();
            var schedule = await client.GetScheduleForCity(_cityId, isUserInitiated);

            if (schedule != null)
            {
                await Task.Run(() => from slot in schedule.Slots
                                     orderby slot.StartTime
                                     group slot by slot.DayFormatted
                    into slotGroup
                                     select new Grouping<string, Slot>(slotGroup.Key, slotGroup)).ContinueWith(r =>
                                     {
                                         GroupedSlots = new ObservableCollection<Grouping<string, Slot>>(r.Result);
                                     });
            }
        }
Ejemplo n.º 2
0
 public async Task GetCities()
 {
     var client = new ServiceClient();
     Cities = await client.GetCities();
 }