public static IEnumerable <Cronofy.Calendar> GetCalendars() { IEnumerable <Cronofy.Calendar> calendars = new Cronofy.Calendar[0]; try { calendars = CronofyAccountRequest <IEnumerable <Cronofy.Calendar> >(() => { return(AccountClient.GetCalendars()); }); LogHelper.Log("GetCalendars success"); } catch (CronofyException) { LogHelper.Log("GetCalendars failure"); } return(calendars); }
public static Cronofy.Calendar CreateCalendar(string profileId, string name) { Cronofy.Calendar calendar = null; try { calendar = CronofyAccountRequest <Cronofy.Calendar>(() => { return(AccountClient.CreateCalendar(profileId, name)); }); LogHelper.Log(String.Format("CreateCalendar success - profileId=`{0}` - name=`{1}`", profileId, name)); } catch (CronofyException) { LogHelper.Log(String.Format("CreateCalendar failure - profileId=`{0}` - name=`{1}`", profileId, name)); throw; } return(calendar); }