Class AzureAppConfigurationRefreshOptions
- Assembly
- Microsoft.Extensions.Configuration.AzureAppConfiguration.dll
Options used to configure the refresh behavior of an Azure App Configuration provider.
public class AzureAppConfigurationRefreshOptions
- Inheritance
-
AzureAppConfigurationRefreshOptions
- Inherited Members
Constructors
AzureAppConfigurationRefreshOptions()
public AzureAppConfigurationRefreshOptions()
Methods
Register(string, bool)
Register the specified key-value to be refreshed when the configuration provider's IConfigurationRefresher triggers a refresh. The IConfigurationRefresher instance can be obtained by calling GetRefresher().
public AzureAppConfigurationRefreshOptions Register(string key, bool refreshAll)
Parameters
key
stringKey of the key-value.
refreshAll
boolIf true, a change in the value of this key refreshes all key-values being used by the configuration provider.
Returns
Register(string, string, bool)
Register the specified key-value to be refreshed when the configuration provider's IConfigurationRefresher triggers a refresh. The IConfigurationRefresher instance can be obtained by calling GetRefresher().
public AzureAppConfigurationRefreshOptions Register(string key, string label = "\0", bool refreshAll = false)
Parameters
key
stringKey of the key-value.
label
stringLabel of the key-value.
refreshAll
boolIf true, a change in the value of this key refreshes all key-values being used by the configuration provider.
Returns
SetCacheExpiration(TimeSpan)
Sets the cache expiration time for the key-values registered for refresh. Default value is 30 seconds. Must be greater than 1 second. Any refresh operation triggered using IConfigurationRefresher will not update the value for a key until the cached value for that key has expired.
public AzureAppConfigurationRefreshOptions SetCacheExpiration(TimeSpan cacheExpiration)
Parameters
cacheExpiration
TimeSpanMinimum time that must elapse before the cache is expired.