/// <summary> /// Returns the default retry policy dedicated to handling transient conditions with SQL commands. /// </summary> /// <returns>The retry policy for SQL commands with the corresponding default strategy (or the default strategy, if no retry strategy assigned to SQL commands was found).</returns> public static RetryPolicy GetDefaultSqlCommandRetryPolicy(this RetryManager retryManager) { if (retryManager == null) { throw new ArgumentNullException("retryManager"); } return(new RetryPolicy(new SqlDatabaseTransientErrorDetectionStrategy(), retryManager.GetDefaultSqlCommandRetryStrategy())); }
/// <summary> /// Returns the default retry policy dedicated to handling transient conditions with SQL commands. /// </summary> /// <returns>The retry policy for SQL commands with the corresponding default strategy (or the default strategy, if no retry strategy assigned to SQL commands was found).</returns> public static RetryPolicy GetDefaultSqlCommandRetryPolicy(this RetryManager retryManager) { Argument.NotNull(retryManager, nameof(retryManager)); return(new RetryPolicy(new SqlDatabaseTransientErrorDetectionStrategy(), retryManager.GetDefaultSqlCommandRetryStrategy())); }