<PackageReference Include="Polly" Version="8.9.1" />

Polly.Context

public class Context : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IDictionary, ICollection, IReadOnlyDictionary<string, object>, IReadOnlyCollection<KeyValuePair<string, object>>
Context that carries with a single execution through a Policy. Commonly-used properties are directly on the class. Backed by a dictionary of string key / object value pairs, to which user-defined values may be added. Do not re-use an instance of Context across more than one call through .Execute(...) or .ExecuteAsync(...).
namespace Polly { public class Context : IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable, IDictionary, ICollection, IReadOnlyDictionary<string, object>, IReadOnlyCollection<KeyValuePair<string, object>> { public string PolicyWrapKey { get; } public string PolicyKey { get; } public string OperationKey { get; } public Guid CorrelationId { get; } public ICollection<string> Keys { get; } public ICollection<object> Values { get; } public int Count { get; } public object this[string key] { get; set; } object IDictionary.this[object key] { get; set; } public Context(string operationKey); public Context(); public Context(string operationKey, IDictionary<string, object> contextData); public void Add(string key, object value); public bool ContainsKey(string key); public bool Remove(string key); public bool TryGetValue(string key, out object value); public void Clear(); public IEnumerator<KeyValuePair<string, object>> GetEnumerator(); public void Add(object key, object value); public bool Contains(object key); public void Remove(object key); public void CopyTo(Array array, int index); } }