Class ResilienceContext
- Namespace
- LMKit.Agents.Resilience
- Assembly
- LM-Kit.NET.dll
Context shared across policy executions.
public sealed class ResilienceContext
- Inheritance
-
ResilienceContext
- Inherited Members
Properties
- AttemptNumber
Gets or sets the current attempt number (1-based).
- Exceptions
Gets the exceptions that occurred during execution.
- this[string]
Gets custom state storage.
- LastException
Gets or sets the last exception that occurred.
- OperationName
Gets the operation name for logging.
- Succeeded
Gets or sets whether the operation succeeded.
- TotalAttempts
Gets the total number of attempts made.
Methods
- GetState<T>(string, T)
Gets a typed value from state.
- SetState<T>(string, T)
Sets a value in state.