/// <inheritdoc /> public DeferMessageFailurePolicy( Func <Exception, bool> canHandle, IBackOffDelayStrategy backOffDelayStrategy = null, int maxDeliveryCount = 10) : base(canHandle, backOffDelayStrategy, maxDeliveryCount) { }
public CloneMessageFailurePolicy( Func <Exception, bool> canHandle, int maxDeliveryCount = 10, IBackOffDelayStrategy backOffDelayStrategy = null) : base(canHandle, maxDeliveryCount, backOffDelayStrategy) { }
/// <summary> /// Initialize a new instance <see cref="IFailurePolicy"/>. /// </summary> /// <param name="canHandle">Function that determines if the exception that has occurred <see cref="IFailurePolicy"/> will be applied to it.</param> /// <param name="backOffDelayStrategy"><see cref="IBackOffDelayStrategy"/> to use when <see cref="IFailurePolicy"/> is applied.</param> /// <param name="maxDeliveryCount">Maximum number of message delivery counts from Azure Service Bus.</param> protected FailurePolicyBase(Func <Exception, bool> canHandle, IBackOffDelayStrategy backOffDelayStrategy = null, int maxDeliveryCount = 10) { _canHandle = canHandle ?? throw new ArgumentNullException(nameof(canHandle)); BackOffDelayStrategy = backOffDelayStrategy ?? new ZeroBackOffDelayStrategy(); MaxDeliveryCount = maxDeliveryCount >= 0 ? maxDeliveryCount : 10; }
protected FailurePolicyBase(Func <Exception, bool> canHandle, int maxDeliveryCount = 10, IBackOffDelayStrategy backOffDelayStrategy = null) { _canHandle = canHandle; MaxDeliveryCount = maxDeliveryCount >= 0 ? maxDeliveryCount : 10; BackOffDelayStrategy = backOffDelayStrategy ?? new ZeroBackOffDelayStrategy(); }