public static async Task <List <ChimeMeeting> > GetMeetingsAsync(bool autoLaunchOutlook) { var meetings = new List <ChimeMeeting>(); var calendars = await OutlookHelper.GetCalendars(autoLaunchOutlook); foreach (var calendar in calendars) { var appointments = OutlookHelper.GetAppointmentsAroundNow(calendar); if (appointments == null) { continue; } foreach (Outlook.AppointmentItem appointment in appointments) { // TODO (if needed): GetPins() will collapse duplicate pins for a specific meeting // but we may need to collapse duplicate meetings across calendars var pins = GetPins(appointment); if (pins.Count > 0) { meetings.Add( new ChimeMeeting() { Subject = appointment.Subject, StartTime = appointment.Start, EndTime = appointment.End, Pins = new List <string>(pins) } ); } } } return(meetings.OrderBy(m => m.StartTime).ToList()); }
public static bool OutlookRunning() { return(OutlookHelper.OutlookRunning()); }