Table of Contents

Class ResiliencePipelineRegistryOptions<TKey>

Namespace
Polly.Registry
Assembly
Polly.Core.dll

An options class used by ResiliencePipelineRegistry<TKey>.

public class ResiliencePipelineRegistryOptions<TKey>

Type Parameters

TKey

The type of the key used by the registry.

Inheritance
ResiliencePipelineRegistryOptions<TKey>
Inherited Members

Properties

BuilderComparer

Gets or sets the comparer that is used by the registry to retrieve the resilience pipeline builders.

[Required]
public IEqualityComparer<TKey> BuilderComparer { get; set; }

Property Value

IEqualityComparer<TKey>

The default value is Default.

BuilderFactory

Gets or sets the factory method that creates instances of ResiliencePipelineBuilder.

[Required]
public Func<ResiliencePipelineBuilder> BuilderFactory { get; set; }

Property Value

Func<ResiliencePipelineBuilder>

The default value is a function that creates a new instance of ResiliencePipelineBuilder using the default constructor.

BuilderNameFormatter

Gets or sets the formatter that is used by the registry to format the TKey to a string that represents the builder name.

[Required]
public Func<TKey, string> BuilderNameFormatter { get; set; }

Property Value

Func<TKey, string>

The default value is a formatter that formats the keys using the ToString() method.

Remarks

Use custom formatter for composite keys in case you want to have different metric values for a builder and strategy key. In general, pipelines can have the same builder name and different pipeline keys.

InstanceNameFormatter

Gets or sets the formatter that is used by the registry to format the TKey to a string that represents the instance name of the builder.

public Func<TKey, string>? InstanceNameFormatter { get; set; }

Property Value

Func<TKey, string>

The default value is null.

Remarks

Use custom formatter for composite keys in case you want to have different metric values for a builder and instance key. In general, pipelines can have the same builder name and different instance names.

PipelineComparer

Gets or sets the comparer that is used by the registry to retrieve the resilience pipelines.

[Required]
public IEqualityComparer<TKey> PipelineComparer { get; set; }

Property Value

IEqualityComparer<TKey>

The default value is Default.