Table of Contents

Struct BreakDurationGeneratorArguments

Namespace
Polly.CircuitBreaker
Assembly
Polly.Core.dll

Represents arguments used to generate a dynamic break duration for a circuit breaker.

public readonly struct BreakDurationGeneratorArguments
Inherited Members

Constructors

BreakDurationGeneratorArguments(double, int, ResilienceContext, int)

Initializes a new instance of the BreakDurationGeneratorArguments struct.

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

Parameters

failureRate double

The failure rate at which the circuit breaker should trip. It represents the ratio of failed actions to the total executed actions.

failureCount int

The number of failures that have occurred. This count is used to determine if the failure threshold has been reached.

context ResilienceContext

The resilience context providing additional information about the execution state and failures.

halfOpenAttempts int

The number of half-open attempts.

Properties

Context

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

public ResilienceContext Context { get; }

Property Value

ResilienceContext

FailureCount

Gets the count of failures that have occurred.

public int FailureCount { get; }

Property Value

int

FailureRate

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

public double FailureRate { get; }

Property Value

double

HalfOpenAttempts

Gets the number of half-open attempts.

public int HalfOpenAttempts { get; }

Property Value

int