Beispiel #1
0
        /// <summary>
        /// Delete tasks.
        /// </summary>
        /// <param name="listType">Task list type.</param>
        /// <param name="taskItems">Task items.</param>
        /// <returns>True if succeed.</returns>
        public async Task <bool> DeleteTasksAsync(string listType, List <TaskItem> taskItems)
        {
            try
            {
                var pageContentUrl = await this.GetDefaultToDoPageAsync(listType);

                var httpRequestMessage = ServiceHelper.GenerateDeleteToDosHttpRequest(taskItems, pageContentUrl.ContentUrl);
                var result             = await ExecuteSendAsync(httpRequestMessage);

                return(result);
            }
            catch (ServiceException ex)
            {
                throw ServiceHelper.HandleGraphAPIException(ex);
            }
        }