/// <summary>
        /// Returns the default retry strategy for SQL connections.
        /// </summary>
        /// <returns>The default retry strategy for SQL connections (or the default strategy, if no default could be found).</returns>
        public static RetryStrategy GetDefaultSqlConnectionRetryStrategy(this RetryManager retryManager)
        {
            Argument.NotNull(retryManager, nameof(retryManager));

            try
            {
                return(retryManager.GetDefaultRetryStrategy(DefaultStrategyConnectionTechnologyName));
            }
            catch (ArgumentOutOfRangeException)
            {
                return(retryManager.GetDefaultRetryStrategy(DefaultStrategyCommandTechnologyName));
            }
        }
Example #2
0
        /// <summary>
        /// Returns the default retry strategy for SQL connections.
        /// </summary>
        /// <returns>The default retry strategy for SQL connections (or the default strategy, if no default could be found).</returns>
        public static RetryStrategy GetDefaultSqlConnectionRetryStrategy(this RetryManager retryManager)
        {
            if (retryManager == null)
            {
                throw new ArgumentNullException("retryManager");
            }

            try
            {
                return(retryManager.GetDefaultRetryStrategy(DefaultStrategyConnectionTechnologyName));
            }
            catch (ArgumentOutOfRangeException)
            {
                return(retryManager.GetDefaultRetryStrategy(DefaultStrategyCommandTechnologyName));
            }
        }
Example #3
0
        /// <summary>
        /// Returns the default retry strategy for SQL commands.
        /// </summary>
        /// <returns>The default retry strategy for SQL commands (or the default strategy, if no default could be found).</returns>
        public static RetryStrategy GetDefaultSqlCommandRetryStrategy(this RetryManager retryManager)
        {
            if (retryManager == null)
            {
                throw new ArgumentNullException("retryManager");
            }

            return(retryManager.GetDefaultRetryStrategy(DefaultStrategyCommandTechnologyName));
        }
Example #4
0
        /// <summary>
        /// Returns the default retry strategy for Windows Azure Caching.
        /// </summary>
        /// <returns>The default Windows Azure Caching retry strategy (or the default strategy if no default could be found for Windows Azure Caching).</returns>
        public static RetryStrategy GetDefaultCachingRetryStrategy(this RetryManager retryManager)
        {
            Argument.NotNull(retryManager, nameof(retryManager));

            return(retryManager.GetDefaultRetryStrategy(DefaultStrategyTechnologyName));
        }