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
ResilienceContextThe outcome of the resilience operation or event.
outcome
Outcome<TResult>The context in which the resilience operation or event occurred.
breakDuration
TimeSpanThe duration of break.
isManual
boolIndicates whether the circuit was opened manually by using CircuitBreakerManualControl.
Properties
BreakDuration
Gets the duration of break.
public TimeSpan BreakDuration { get; }
Property Value
Context
Gets the context of this event.
public ResilienceContext Context { get; }
Property Value
IsManual
Gets a value indicating whether the circuit was opened manually by using CircuitBreakerManualControl.
public bool IsManual { get; }
Property Value
Outcome
Gets the outcome that caused the circuit to open.
public Outcome<TResult> Outcome { get; }
Property Value
- Outcome<TResult>