private void InitRetryPolicy() { // Get an instance of the RetryManager class. _retryManager = _retryManager ?? RetryPolicyFactory.CreateDefault(); _connRetryPolicy = _retryManager.GetDefaultSqlConnectionRetryPolicy(); _cmdRetryPolicy = _retryManager.GetDefaultSqlCommandRetryPolicy(); }
public void Initialize() { connectionString = TestSqlSupport.SqlDatabaseConnectionString; RetryPolicyFactory.CreateDefault(); connection = new ReliableSqlConnection(connectionString); connection.ConnectionRetryPolicy.Retrying += (sender, args) => Trace.WriteLine(string.Format("[Connection Retry] Current Retry Count: {0}, Last Exception: {0}, Delay (ms): {0}", args.CurrentRetryCount, args.LastException.Message, args.Delay.TotalMilliseconds)); connection.CommandRetryPolicy.Retrying += (sender, args) => Trace.WriteLine(string.Format("[Command Retry] Current Retry Count: {0}, Last Exception: {0}, Delay (ms): {0}", args.CurrentRetryCount, args.LastException.Message, args.Delay.TotalMilliseconds)); }
public void Setup() { RetryPolicyFactory.CreateDefault(); }
public void Initialize() { this.connectionString = TestSqlSupport.SqlDatabaseConnectionString; RetryPolicyFactory.CreateDefault(); }
public void Setup() { connectionString = TestSqlSupport.SqlDatabaseConnectionString; RetryPolicyFactory.CreateDefault(); }