<PackageReference Include="Polly.Core" Version="8.5.2" />

ResiliencePipelineRegistry<TKey>

Represents a registry of resilience pipelines and builders that are accessible by TKey.

Initializes a new instance of the ResiliencePipelineRegistry<T> class with the default comparer.

Initializes a new instance of the ResiliencePipelineRegistry<T> class with a custom builder factory and comparer.

public void Dispose()

Disposes all resources that are held by the resilience pipelines created by this builder.

Disposes all resources that are held by the resilience pipelines created by this builder.

Gets existing pipeline or creates a new one using the configure callback.

Gets existing pipeline or creates a new one using the configure callback.

public ResiliencePipeline<TResult> GetOrAddPipeline<TResult>(TKey key, Action<ResiliencePipelineBuilder<TResult>> configure)

Gets existing pipeline or creates a new one using the configure callback.

public ResiliencePipeline<TResult> GetOrAddPipeline<TResult>(TKey key, Action<ResiliencePipelineBuilder<TResult>, ConfigureBuilderContext<TKey>> configure)

Gets existing pipeline or creates a new one using the configure callback.

public bool TryAddBuilder(TKey key, Action<ResiliencePipelineBuilder, ConfigureBuilderContext<TKey>> configure)

Tries to add a resilience pipeline builder to the registry.

public bool TryAddBuilder<TResult>(TKey key, Action<ResiliencePipelineBuilder<TResult>, ConfigureBuilderContext<TKey>> configure)

Tries to add a generic resilience pipeline builder to the registry.