Struct OnCircuitOpenedArguments<TResult>
- Namespace
- Polly.CircuitBreaker
- Assembly
- Polly.Core.dll
Arguments used by OnOpened event.
public readonly struct OnCircuitOpenedArguments<TResult>
Type Parameters
TResultThe 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
contextResilienceContextThe outcome of the resilience operation or event.
outcomeOutcome<TResult>The context in which the resilience operation or event occurred.
breakDurationTimeSpanThe duration of break.
isManualboolIndicates 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>