Example #1
0
 public RetryTracker(int? maxRetries, TimeSpan? timeLimit, RetryInterval retryInterval, bool throwOnFailure = true)
 {
     this.maxRetries = maxRetries;
     if (maxRetries.HasValue && maxRetries.Value < 1) throw new ArgumentException("maxretries must be 1 or more if set");
     this.timeLimit = timeLimit;
     this.retryInterval = retryInterval;
     ThrowOnFailure = throwOnFailure;
 }
Example #2
0
 public RetryTracker(int?maxRetries, TimeSpan?timeLimit, RetryInterval retryInterval, bool throwOnFailure = true)
 {
     this.maxRetries = maxRetries;
     if (maxRetries.HasValue && maxRetries.Value < 1)
     {
         throw new ArgumentException("maxretries must be 1 or more if set");
     }
     this.timeLimit     = timeLimit;
     this.retryInterval = retryInterval;
     ThrowOnFailure     = throwOnFailure;
 }