Пример #1
0
        /// <summary>
        /// Sets the specified retry manager as the default retry manager.
        /// </summary>
        /// <param name="retryManager">The retry manager.</param>
        /// <param name="throwIfSet">true to throw an exception if the manager is already set; otherwise, false.</param>
        public static void SetDefault(RetryManager retryManager, bool throwIfSet)
        {
            if (_defaultRetryManager != null && throwIfSet && retryManager != _defaultRetryManager)
            {
                throw new InvalidOperationException(Resources.ExceptionRetryManagerAlreadySet);
            }

            _defaultRetryManager = retryManager;
        }
Пример #2
0
 /// <summary>
 /// Sets the specified retry manager as the default retry manager.
 /// Will throw an exception if the manager is already set.
 /// </summary>
 /// <param name="retryManager">The retry manager.</param>
 public static void SetDefault(RetryManager retryManager)
 {
     SetDefault(retryManager, true);
 }