/// <summary>
 /// Sets the Auto Block configuration.
 /// </summary>
 /// <param name="configuration">The new value of the configuration.</param>
 /// <returns>The response of the set configuration request.</returns>
 public async Task<DsmApiResponse> SetConfig(DsmAutoBlockConfiguration configuration)
 {
     DsmApiResponse response = await this.ApiContext.Request(
         this.ApiInfo.Path,
         DsmAutoBlockApiName,
         this.ApiInfo.MaxVersion,
         "setconfig",
         new Dictionary<string, string>()
         {
             { "attemptmin", configuration.AttemptsPeriod.ToString(CultureInfo.InvariantCulture) },
             { "attempts", configuration.Attempts.ToString(CultureInfo.InvariantCulture) },
             { "expiredday", configuration.ExpiredDay.ToString(CultureInfo.InvariantCulture) }
         });
     return response;
 }
Exemple #2
0
        /// <summary>
        /// Sets the Auto Block configuration.
        /// </summary>
        /// <param name="configuration">The new value of the configuration.</param>
        /// <returns>The response of the set configuration request.</returns>
        public async Task <DsmApiResponse> SetConfig(DsmAutoBlockConfiguration configuration)
        {
            DsmApiResponse response = await this.ApiContext.Request(
                this.ApiInfo.Path,
                DsmAutoBlockApiName,
                this.ApiInfo.MaxVersion,
                "setconfig",
                new Dictionary <string, string>()
            {
                { "attemptmin", configuration.AttemptsPeriod.ToString(CultureInfo.InvariantCulture) },
                { "attempts", configuration.Attempts.ToString(CultureInfo.InvariantCulture) },
                { "expiredday", configuration.ExpiredDay.ToString(CultureInfo.InvariantCulture) }
            });

            return(response);
        }