Пример #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(Strings.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);
 }