Struct HedgingPredicateArguments<TResult>
Represents arguments used in hedging handling scenarios.
public readonly struct HedgingPredicateArguments<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
HedgingPredicateArguments(ResilienceContext, Outcome<TResult>)
Initializes a new instance of the HedgingPredicateArguments<TResult> struct.
public HedgingPredicateArguments(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.
HedgingPredicateArguments(ResilienceContext, Outcome<TResult>, int)
Initializes a new instance of the HedgingPredicateArguments<TResult> struct.
public HedgingPredicateArguments(ResilienceContext context, Outcome<TResult> outcome, int attemptNumber)
Parameters
context
ResilienceContextThe outcome of the resilience operation or event.
outcome
Outcome<TResult>The context in which the resilience operation or event occurred.
attemptNumber
intThe zero-based attempt number.
Properties
AttemptNumber
Gets the zero-based attempt number.
public int? AttemptNumber { get; }
Property Value
- int?
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>