Ejemplo n.º 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;
        }
Ejemplo n.º 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);
 }