internal ReliableSqlCommand(ReliableSqlConnection currentConnection, SqlCommand sqlCommandToWrap, SmartRetryPolicy retryPolicy) { Debug.Assert(currentConnection != null, "currentConnection param is null"); Debug.Assert(sqlCommandToWrap != null, "sqlCommandToWrap param is null"); Debug.Assert(retryPolicy != null, "retryPolicy param is null"); _currentConnection = currentConnection; _sqlCommandToWrap = sqlCommandToWrap; _retryPolicy = retryPolicy; }
public SmartRetryPolicy Clone() { var cloned = new SmartRetryPolicy(ErrorDetectionStrategy, RetryStrategy); if (_retryingHandler != null) { cloned.Subscribe(_retryingHandler); } return(cloned); }
internal ReliableSqlConnection(string connectionString, SmartRetryPolicy retryPolicy) { if (connectionString == null) { throw new ArgumentNullException("connectionString"); } Debug.Assert(retryPolicy != null); _connectionString = connectionString; _retryPolicy = retryPolicy; _connection = new SqlConnection(_connectionString); }
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); }