Struct CircuitBreakerPredicateArguments<TResult>
- Namespace
- Polly.CircuitBreaker
- Assembly
- Polly.Core.dll
Arguments used by ShouldHandle predicate.
public readonly struct CircuitBreakerPredicateArguments<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
CircuitBreakerPredicateArguments(ResilienceContext, Outcome<TResult>)
Initializes a new instance of the CircuitBreakerPredicateArguments<TResult> struct.
public CircuitBreakerPredicateArguments(ResilienceContext context, Outcome<TResult> outcome)
Parameters
context
ResilienceContextThe outcome of the resilience operation or event.
outcome
Outcome<TResult>The context in which the resilience operation or event occurred.
Properties
Context
Gets the context of this event.
public ResilienceContext Context { get; }
Property Value
Outcome
Gets the outcome of the user-specified callback.
public Outcome<TResult> Outcome { get; }
Property Value
- Outcome<TResult>