コード例 #1
0
        public static List <Calendar> GetCalendarsForAccount(CalendarAccount selectedAccount)
        {
            //create empty calendar list
            var calendarList = new List <Calendar>();

            //based on calendar account use the right calendar list getter
            switch (selectedAccount)
            {
            case CalendarAccount.Google:
                calendarList = CalendarManager.GetCalendarListGoogle();
                break;

            case CalendarAccount.iCloud:
                LogManager.Error("iCloud not supported atm!");
                break;

            case CalendarAccount.Outlook:
                LogManager.Error("Outlook not supported atm!");
                break;
            }

            //return possibly filed list to caller
            return(calendarList);
        }