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

ConfigureBuilderContext<TKey>

public class ConfigureBuilderContext<TKey>
The context used by ResilienceStrategyRegistry<T>.
using Polly.Utils; using System; using System.ComponentModel; using System.Runtime.CompilerServices; using System.Threading; namespace Polly.Registry { [System.Runtime.CompilerServices.NullableContext(1)] [System.Runtime.CompilerServices.Nullable(0)] public class ConfigureBuilderContext<TKey> { public TKey StrategyKey { get; } public string BuilderName { get; } [System.Runtime.CompilerServices.Nullable(2)] [field: System.Runtime.CompilerServices.Nullable(2)] public string BuilderInstanceName { [System.Runtime.CompilerServices.NullableContext(2)] get; } [System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] [field: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] internal Func<Func<CancellationToken>> ReloadTokenProducer { [return: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] get; [param: System.Runtime.CompilerServices.Nullable(new byte[] { 2, 1 })] private set; } internal ConfigureBuilderContext(TKey strategyKey, string builderName, [System.Runtime.CompilerServices.Nullable(2)] string builderInstanceName) { StrategyKey = strategyKey; BuilderName = builderName; BuilderInstanceName = builderInstanceName; } [EditorBrowsable(EditorBrowsableState.Never)] public void EnableReloads(Func<Func<CancellationToken>> tokenProducerFactory) { Guard.NotNull<Func<Func<CancellationToken>>>(tokenProducerFactory, "tokenProducerFactory"); ReloadTokenProducer = tokenProducerFactory; } } }