<PackageReference Include="Polly.Core" Version="8.5.0" />

BreakDurationGeneratorArguments

Represents arguments used to generate a dynamic break duration for a circuit breaker.
public ResilienceContext Context { get; }

Gets the context that provides additional information about the resilience operation.

public int FailureCount { get; }

Gets the count of failures that have occurred.

public double FailureRate { get; }

Gets the failure rate that represents the ratio of failures to total actions.

public int HalfOpenAttempts { get; }

Gets the number of half-open attempts.

public BreakDurationGeneratorArguments(double failureRate, int failureCount, ResilienceContext context)

Initializes a new instance of the BreakDurationGeneratorArguments struct.

public BreakDurationGeneratorArguments(double failureRate, int failureCount, ResilienceContext context, int halfOpenAttempts)

Initializes a new instance of the BreakDurationGeneratorArguments struct.