Пример #1
0
        /// <summary>
        /// Completes a recurring task. See also <see cref="CloseAsync" /> for a simplified version of the command.
        /// </summary>
        /// <param name="recurringItemState">State of the recurring item.</param>
        /// <returns>Returns <see cref="T:System.Threading.Tasks.Task" />.The task object representing the asynchronous operation.</returns>
        /// <exception cref="HttpRequestException">API exception.</exception>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="recurringItemState"/> is <see langword="null"/></exception>
        public Task CompleteRecurringAsync(RecurringItemState recurringItemState)
        {
            if (recurringItemState == null)
            {
                throw new ArgumentNullException(nameof(recurringItemState));
            }

            var command = new Command(
                CommandType.CompleteRecurringItem,
                new CompleteRecurringItemArgument(recurringItemState));

            return(ExecuteCommandAsync(command));
        }
Пример #2
0
        /// <summary>
        /// Completes a recurring task. See also <see cref="CloseAsync" /> for a simplified version of the command.
        /// </summary>
        /// <param name="recurringItemState">State of the recurring item.</param>
        /// <returns>Returns <see cref="T:System.Threading.Tasks.Task" />.The task object representing the asynchronous operation.</returns>
        /// <exception cref="HttpRequestException">API exception.</exception>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="recurringItemState"/> is <see langword="null"/></exception>
        public async Task CompleteRecurringAsync(RecurringItemState recurringItemState)
        {
            if (recurringItemState == null)
            {
                throw new ArgumentNullException(nameof(recurringItemState));
            }

            var command = new Command(
                CommandType.CompleteRecurringItem,
                new CompleteRecurringItemArgument(recurringItemState));

            await ExecuteCommandAsync(command).ConfigureAwait(false);
        }