<PackageReference Include="Polly.Core" Version="8.0.0-alpha.4" />

ResilienceStrategyProvider<TKey>

public abstract class ResilienceStrategyProvider<TKey>
Represents a provider for resilience strategies that are accessible by TKey.

public virtual ResilienceStrategy GetStrategy(TKey key)

Retrieves a resilience strategy from the provider using the specified key.

public virtual ResilienceStrategy<TResult> GetStrategy<TResult>(TKey key)

Retrieves a generic resilience strategy from the provider using the specified key.

public abstract bool TryGetStrategy(TKey key, out ResilienceStrategy strategy)

Tries to get a resilience strategy from the provider using the specified key.

public abstract bool TryGetStrategy<TResult>(TKey key, out ResilienceStrategy strategy)

Tries to get a generic resilience strategy from the provider using the specified key.