コード例 #1
0
        /// <summary>
        /// Gets the current user info.
        /// </summary>
        /// <param name="karmaGoals">The karma goals.</param>
        /// <returns>The current user info.</returns>
        /// <exception cref="HttpRequestException">API exception.</exception>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="karmaGoals" /> is <see langword="null" /></exception>
        public async Task UpdateKarmaGoalsAsync(KarmaGoals karmaGoals)
        {
            if (karmaGoals == null)
            {
                throw new ArgumentNullException(nameof(karmaGoals));
            }

            var command = new Command(CommandType.UpdateKarmaGoals, karmaGoals);

            await ExecuteCommandAsync(command).ConfigureAwait(false);
        }
コード例 #2
0
        /// <summary>
        /// Gets the current user info.
        /// </summary>
        /// <param name="karmaGoals">The karma goals.</param>
        /// <returns>The current user info.</returns>
        /// <exception cref="HttpRequestException">API exception.</exception>
        /// <exception cref="AggregateException">Command execution exception.</exception>
        /// <exception cref="ArgumentNullException"><paramref name="karmaGoals" /> is <see langword="null" /></exception>
        public Task UpdateKarmaGoalsAsync(KarmaGoals karmaGoals)
        {
            if (karmaGoals == null)
            {
                throw new ArgumentNullException(nameof(karmaGoals));
            }

            var command = new Command(CommandType.UpdateKarmaGoals, karmaGoals);

            return(ExecuteCommandAsync(command));
        }