Currently, the provider only has the AzureAppConfigurationRefreshOptions.Register method as a way to monitor individual key-values for refresh. By adding a new API, we can enable monitoring for all of the key-values to be loaded by the provider. Then, when a refresh is triggered, the provider will reload the configuration if any of the selected key-values have changed in App Configuration. You can only call one of RegisterAll or Register, not both.
Proposed API: RegisterAll
config.AddAzureAppConfiguration(options => {
options.ConfigureRefresh(refresh =>
{
refresh.RegisterAll();
});
});
In the example above, since the provider selects all key-values with label null by default if no Select or SelectSnapshot statement is present, all of the key-values that have no label will be monitored when RegisterAll is called. If any of them have changed since the last refresh attempt, the configuration will be reloaded.
config.AddAzureAppConfiguration(options => {
options.Select("TestApp*", "prod");
options.ConfigureRefresh(refresh =>
{
refresh.RegisterAll();
});
});
Now, changes to key-values that start with TestApp and have the label prod will trigger a configuration reload.
Currently, the provider only has the
AzureAppConfigurationRefreshOptions.Registermethod as a way to monitor individual key-values for refresh. By adding a new API, we can enable monitoring for all of the key-values to be loaded by the provider. Then, when a refresh is triggered, the provider will reload the configuration if any of the selected key-values have changed in App Configuration. You can only call one ofRegisterAllorRegister, not both.Proposed API: RegisterAll
In the example above, since the provider selects all key-values with label
nullby default if noSelectorSelectSnapshotstatement is present, all of the key-values that have no label will be monitored whenRegisterAllis called. If any of them have changed since the last refresh attempt, the configuration will be reloaded.Now, changes to key-values that start with
TestAppand have the labelprodwill trigger a configuration reload.