/// <summary>
 /// Iniatilizes a new instance of OAuth2RequestWithRetry.
 /// </summary>
 /// <param name="config">The config.</param>
 public OAuth2RequestWithRetry(OAuth2RequestConfig config)
     : base(config.Method, config.Url, config.Parameters, config.Account)
 {
     if (this.CheckConfig(config))
     {
         this.config = config;
     }
     else
     {
         throw new OAuth2RequestInvalidConfigException();
     }
 }
 private bool CheckConfig(OAuth2RequestConfig config)
 {
     return(config.Timeout != 0 && config.MaximumTimeout != 0 && config.NumberOfRetries != 0 && config.WaitTimeCallback != null);
 }