示例#1
0
        private void Button_Click_Outlook(object sender, RoutedEventArgs e)
        {
            MyGrid.IsEnabled = false;
            var outlookService = new OutlookCalendarService();

            outlookService.GetOutlookAppointmentsAsync(0, 3).ContinueWith(ContinuationAction, TaskScheduler.FromCurrentSynchronizationContext());
        }
示例#2
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            var scheduler      = TaskScheduler.FromCurrentSynchronizationContext();
            var outlookService = new OutlookCalendarService();

            outlookService.GetOutlookAppointmentsAsync(0, 2).ContinueWith(task => AddEventToTest(task.Result, scheduler));
        }
示例#3
0
        private async Task <List <Appointment> > GetEqualAppointments(GoogleCalendarService googleCalenderService, OutlookCalendarService outlookCalendarService, string calenderId)
        {
            List <Appointment> googleAppointments = await googleCalenderService.GetCalendarEventsInRangeAsync(0, 2, calenderId);

            List <Appointment> outLookAppointments = await outlookCalendarService.GetOutlookAppointmentsAsync(0, 2);

            return((from lookAppointment in outLookAppointments
                    let isAvailable = googleAppointments.Any(appointment => appointment.Equals(lookAppointment))
                                      where isAvailable
                                      select lookAppointment).ToList());
        }
 private void Button_Click_Outlook(object sender, RoutedEventArgs e)
 {
     MyGrid.IsEnabled = false;
     var outlookService = new OutlookCalendarService();
     outlookService.GetOutlookAppointmentsAsync(0, 3).ContinueWith(ContinuationAction, TaskScheduler.FromCurrentSynchronizationContext());
 }
 private void Button_Click(object sender, RoutedEventArgs e)
 {
     var scheduler = TaskScheduler.FromCurrentSynchronizationContext();
     var outlookService = new OutlookCalendarService();
     outlookService.GetOutlookAppointmentsAsync(0, 2).ContinueWith(task => AddEventToTest(task.Result, scheduler));
 }
        private async Task<List<Appointment>> GetEqualAppointments(GoogleCalendarService googleCalenderService, OutlookCalendarService outlookCalendarService, string calenderId)
        {
            List<Appointment> googleAppointments = await googleCalenderService.GetCalendarEventsInRangeAsync(0, 2, calenderId);
            List<Appointment> outLookAppointments = await outlookCalendarService.GetOutlookAppointmentsAsync(0, 2);

            return (from lookAppointment in outLookAppointments
                    let isAvailable = googleAppointments.Any(appointment => appointment.Equals(lookAppointment))
                    where isAvailable
                    select lookAppointment).ToList();
        }