Table of Contents

Class AzureAppConfigurationRefreshOptions

Namespace
Microsoft.Extensions.Configuration.AzureAppConfiguration
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 string

Key of the key-value.

refreshAll bool

If true, a change in the value of this key refreshes all key-values being used by the configuration provider.

Returns

AzureAppConfigurationRefreshOptions

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 string

Key of the key-value.

label string

Label of the key-value.

refreshAll bool

If true, a change in the value of this key refreshes all key-values being used by the configuration provider.

Returns

AzureAppConfigurationRefreshOptions

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 TimeSpan

Minimum time that must elapse before the cache is expired.

Returns

AzureAppConfigurationRefreshOptions