コード例 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="RetryPolicy"/> class with the specified number of retry
        /// attempts and parameters defining the progressive delay between retries.
        /// </summary>
        /// <param name="errorDetectionStrategy">The <see cref="ITransientErrorDetectionStrategy"/> that is
        /// responsible for detecting transient conditions.</param>
        /// <param name="retryStrategy">The strategy to use for this retry policy.</param>
        public RetryPolicy(ITransientErrorDetectionStrategy errorDetectionStrategy, RetryStrategy retryStrategy)
        {
            Guard.ArgumentNotNull(errorDetectionStrategy, "errorDetectionStrategy");
            Guard.ArgumentNotNull(retryStrategy, "retryPolicy");

            this.ErrorDetectionStrategy = errorDetectionStrategy;
            this.RetryStrategy          = retryStrategy;
        }
コード例 #2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="RetryPolicy{T}"/> class with the specified number of
 /// retry attempts and parameters defining the progressive delay between retries.
 /// </summary>
 /// <param name="retryStrategy">The strategy to use for this retry policy.</param>
 public RetryPolicy(RetryStrategy retryStrategy)
     : base(new T(), retryStrategy)
 {
 }