Пример #1
0
        public SmartRetryPolicy Clone()
        {
            var cloned = new SmartRetryPolicy(ErrorDetectionStrategy, RetryStrategy);

            if (_retryingHandler != null)
            {
                cloned.Subscribe(_retryingHandler);
            }

            return(cloned);
        }
Пример #2
0
        protected ConnectionManager(string connectionString, SmartRetryPolicy retryPolicy)
        {
            if (connectionString == null)
            {
                throw new ArgumentNullException("connectionString");
            }
            if (retryPolicy == null)
            {
                throw new ArgumentNullException("retryPolicy");
            }

            _connectionString  = connectionString;
            _globalRetryPolicy = retryPolicy;
            _globalRetryPolicy.Subscribe(GlobalConnectionPolicyOnRetrying);
        }