コード例 #1
0
        public RetryPolicySettings()
        {
            _sleepDurationProvider = SleepDurationProvider.Jitter(
                Defaults.Retry.RetryCount,
                TimeSpan.FromMilliseconds(Defaults.Retry.MedianFirstRetryDelayInMilliseconds));

            OnRetry = DoNothingOnRetry;
        }
 public static RetryPolicySettings Jitter(int retryCount, TimeSpan medianFirstRetryDelay)
 {
     return(new RetryPolicySettings(
                SleepDurationProvider.Jitter(retryCount, medianFirstRetryDelay)));
 }
 public static RetryPolicySettings Exponential(int retryCount, TimeSpan initialDelay)
 {
     return(new RetryPolicySettings(
                SleepDurationProvider.Exponential(retryCount, initialDelay)));
 }
 public static RetryPolicySettings Constant(int retryCount, TimeSpan initialDelay)
 {
     return(new RetryPolicySettings(
                SleepDurationProvider.Constant(retryCount, initialDelay)));
 }
 public RetryPolicySettings()
     : this(SleepDurationProvider.Jitter(
                Defaults.Retry.RetryCount,
                TimeSpan.FromMilliseconds(Defaults.Retry.MedianFirstRetryDelayInMilliseconds)))
 {
 }