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

IPolicyRegistry<TKey>

public interface IPolicyRegistry<TKey>
Represents a collection of policies keyed by TKey.
namespace Polly.Registry { public interface IPolicyRegistry<in TKey> { IsPolicy this[TKey key] { get; set; } int Count { get; } void Add<TPolicy>(TKey key, TPolicy policy) where TPolicy : IsPolicy; TPolicy Get<TPolicy>(TKey key) where TPolicy : IsPolicy; bool TryGet<TPolicy>(TKey key, out TPolicy policy) where TPolicy : IsPolicy; bool ContainsKey(TKey key); bool Remove(TKey key); void Clear(); } }