Esempio n. 1
0
        public LinearRetryPolicy(
            TraceType traceType,
            TimeSpan deltaBackoff,
            int maxAttempts)
        {
            traceType.ThrowIfNull("traceType");

            this.traceType    = traceType;
            this.DeltaBackoff = deltaBackoff;
            this.MaxAttempts  = maxAttempts;
        }
Esempio n. 2
0
        public LinearRetryPolicyFactory(
            TraceType traceType,
            int backoffPeriodInMilliseconds,
            int maxRetryAttempts,
            Func <Exception, bool> shouldRetry)
        {
            traceType.ThrowIfNull("traceType");
            shouldRetry.ThrowIfNull("shouldRetry");

            this.traceType = traceType;
            this.backoffPeriodInMilliseconds = backoffPeriodInMilliseconds;
            this.maxRetryAttempts            = maxRetryAttempts;
            this.shouldRetry = shouldRetry;
        }