Class ConfigureBuilderContextExtensions
Extensions for ConfigureBuilderContext<TKey>.
public static class ConfigureBuilderContextExtensions
- Inheritance
-
ConfigureBuilderContextExtensions
- Inherited Members
Methods
EnableReloads<TKey, TOptions>(ConfigureBuilderContext<TKey>, IOptionsMonitor<TOptions>, string?)
Enables dynamic reloading of the resilience pipeline whenever the TOptions
options are changed.
public static void EnableReloads<TKey, TOptions>(this ConfigureBuilderContext<TKey> context, IOptionsMonitor<TOptions> optionsMonitor, string? name = null) where TKey : notnull
Parameters
context
ConfigureBuilderContext<TKey>The builder context.
optionsMonitor
IOptionsMonitor<TOptions>The options monitor.
name
stringThe named options, if any.
Type Parameters
TKey
The type of the key used to identify the resilience pipeline.
TOptions
The options type to listen to.
Remarks
You can decide based on the name
to listen for changes in global options or named options.
If name
is null then the global options are listened to.
You can listen for changes only for single options. If you call this method multiple times, the preceding calls are ignored and only the last one wins.