public static void AgainstNegative([InvokerParameterName] string argumentName, TimeSpan value) { if (value < TimeSpan.Zero) { throw new ArgumentOutOfRangeException(argumentName); } } }
/// <summary> /// Number of retries when operation is throttled. /// <remarks>Default is 5 attempts.</remarks> /// </summary> public AzureServiceBusMessageSenderSettings RetryAttemptsOnThrottle(int count) { Guard.AgainstNegative(nameof(count), count); settings.Set(WellKnownConfigurationKeys.Connectivity.MessageSenders.RetryAttemptsOnThrottle, count); return(this); }