예제 #1
0
        public static async Task <bool> TryCreateCalendarEventAsync()
        {
            var newEventId = await CalendarSnippets.AddCalendarEventAsync();

            if (newEventId == null)
            {
                return(false);
            }

            //Cleanup
            await CalendarSnippets.DeleteCalendarEventAsync(newEventId);

            return(true);
        }
예제 #2
0
        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);
        }