public static async Task <bool> TryCreateCalendarEventAsync() { var newEventId = await CalendarSnippets.AddCalendarEventAsync(); if (newEventId == null) { return(false); } //Cleanup await CalendarSnippets.DeleteCalendarEventAsync(newEventId); return(true); }
public static async Task <bool> TryDeleteCalendarEventAsync() { var newEventId = await CalendarSnippets.AddCalendarEventAsync(); if (newEventId == null) { return(false); } // Delete the event var deletedEvent = await CalendarSnippets.DeleteCalendarEventAsync(newEventId); if (deletedEvent == null) { return(false); } return(true); }