Class DegradationContext<T>
- Namespace
- Excalibur.Dispatch.Resilience.Polly
- Assembly
- Excalibur.Dispatch.Resilience.Polly.dll
Context for degradation operations.
public sealed class DegradationContext<T>
Type Parameters
TThe type of result returned by the operation.
- Inheritance
-
DegradationContext<T>
- Inherited Members
- Extension Methods
Properties
Fallbacks
Gets fallback operations for each degradation level.
public IReadOnlyDictionary<DegradationLevel, Func<Task<T>>> Fallbacks { get; init; }
Property Value
- IReadOnlyDictionary<DegradationLevel, Func<Task<T>>>
A dictionary mapping each degradation level to the corresponding fallback operation.
IsCritical
Gets a value indicating whether this operation is critical.
public bool IsCritical { get; init; }
Property Value
Metadata
Gets custom metadata for the operation.
public IReadOnlyDictionary<string, object> Metadata { get; init; }
Property Value
- IReadOnlyDictionary<string, object>
A read-only dictionary of additional metadata appended to emitted events.
OperationName
Gets the operation name for tracking.
public string OperationName { get; init; }
Property Value
- string
The descriptive name used when emitting metrics and logs. Defaults to "Unknown".
PrimaryOperation
Gets the primary operation to execute.
public required Func<Task<T>> PrimaryOperation { get; init; }
Property Value
Priority
Gets the priority of the operation (higher = more important).
public int Priority { get; init; }
Property Value
- int
An integer ranking that influences scheduling when resources are constrained.