Table of Contents

Struct OnCircuitOpenedArguments<TResult>

Namespace
Polly.CircuitBreaker
Assembly
Polly.Core.dll

Arguments used by OnOpened event.

public readonly struct OnCircuitOpenedArguments<TResult>

Type Parameters

TResult

The type of result.

Inherited Members

Remarks

Always use the constructor when creating this struct, otherwise we do not guarantee binary compatibility.

Constructors

OnCircuitOpenedArguments(ResilienceContext, Outcome<TResult>, TimeSpan, bool)

Initializes a new instance of the OnCircuitOpenedArguments<TResult> struct.

public OnCircuitOpenedArguments(ResilienceContext context, Outcome<TResult> outcome, TimeSpan breakDuration, bool isManual)

Parameters

context ResilienceContext

The outcome of the resilience operation or event.

outcome Outcome<TResult>

The context in which the resilience operation or event occurred.

breakDuration TimeSpan

The duration of break.

isManual bool

Indicates whether the circuit was opened manually by using CircuitBreakerManualControl.

Properties

BreakDuration

Gets the duration of break.

public TimeSpan BreakDuration { get; }

Property Value

TimeSpan

Context

Gets the context of this event.

public ResilienceContext Context { get; }

Property Value

ResilienceContext

IsManual

Gets a value indicating whether the circuit was opened manually by using CircuitBreakerManualControl.

public bool IsManual { get; }

Property Value

bool

Outcome

Gets the outcome that caused the circuit to open.

public Outcome<TResult> Outcome { get; }

Property Value

Outcome<TResult>