Class AzureAppConfigurationOptions
- Assembly
- Microsoft.Extensions.Configuration.AzureAppConfiguration.dll
Options used to configure the behavior of an Azure App Configuration provider.
public class AzureAppConfigurationOptions
- Inheritance
-
AzureAppConfigurationOptions
- Inherited Members
Constructors
AzureAppConfigurationOptions()
public AzureAppConfigurationOptions()
Properties
KeyValueSelectors
A collection of KeyValueSelector.
public IEnumerable<KeyValueSelector> KeyValueSelectors { get; }
Property Value
OfflineCache
An offline cache provider which can be used to enable offline data retrieval and storage.
public IOfflineCache OfflineCache { get; }
Property Value
Methods
ConfigureClientOptions(Action<ConfigurationClientOptions>)
Configure the client used to communicate with Azure App Configuration.
public AzureAppConfigurationOptions ConfigureClientOptions(Action<ConfigurationClientOptions> configure)
Parameters
configure
Action<ConfigurationClientOptions>A callback used to configure Azure App Configuration client options.
Returns
ConfigureKeyVault(Action<AzureAppConfigurationKeyVaultOptions>)
Configures the Azure App Configuration provider to use the provided Key Vault configuration to resolve key vault references.
public AzureAppConfigurationOptions ConfigureKeyVault(Action<AzureAppConfigurationKeyVaultOptions> configure)
Parameters
configure
Action<AzureAppConfigurationKeyVaultOptions>A callback used to configure Azure App Configuration key vault options.
Returns
ConfigureRefresh(Action<AzureAppConfigurationRefreshOptions>)
Configure refresh for key-values in the configuration provider.
public AzureAppConfigurationOptions ConfigureRefresh(Action<AzureAppConfigurationRefreshOptions> configure)
Parameters
configure
Action<AzureAppConfigurationRefreshOptions>A callback used to configure Azure App Configuration refresh options.
Returns
Connect(string)
Connect the provider to the Azure App Configuration service via a connection string.
public AzureAppConfigurationOptions Connect(string connectionString)
Parameters
connectionString
stringUsed to authenticate with Azure App Configuration.
Returns
Connect(Uri, TokenCredential)
Connect the provider to Azure App Configuration using endpoint and token credentials.
public AzureAppConfigurationOptions Connect(Uri endpoint, TokenCredential credential)
Parameters
endpoint
UriThe endpoint of the Azure App Configuration to connect to.
credential
TokenCredentialToken credentials to use to connect.
Returns
GetRefresher()
Get an instance of IConfigurationRefresher that can be used to trigger a refresh for the registered key-values.
public IConfigurationRefresher GetRefresher()
Returns
- IConfigurationRefresher
An instance of IConfigurationRefresher.
Select(string, string)
Specify what key-values to include in the configuration provider. Select(string, string) can be called multiple times to include multiple sets of key-values.
public AzureAppConfigurationOptions Select(string keyFilter, string labelFilter = "\0")
Parameters
keyFilter
stringThe key filter to apply when querying Azure App Configuration for key-values. The characters asterisk (*), comma (,) and backslash () are reserved and must be escaped using a backslash (). Built-in key filter options: KeyFilter.
labelFilter
stringThe label filter to apply when querying Azure App Configuration for key-values. By default the null label will be used. Built-in label filter options: LabelFilter The characters asterisk (*) and comma (,) are not supported. Backslash () character is reserved and must be escaped using another backslash ().
Returns
SetOfflineCache(IOfflineCache)
Use an offline file cache to store Azure App Configuration data or retrieve previously stored data during offline periods.
public AzureAppConfigurationOptions SetOfflineCache(IOfflineCache offlineCache)
Parameters
offlineCache
IOfflineCacheThe offline file cache to use for storing/retrieving Azure App Configuration data.
Returns
TrimKeyPrefix(string)
Trims the provided prefix from the keys of all key-values retrieved from Azure App Configuration.
public AzureAppConfigurationOptions TrimKeyPrefix(string prefix)
Parameters
prefix
stringThe prefix to be trimmed.
Returns
UseFeatureFlags(Action<FeatureFlagOptions>)
Enables Azure App Configuration feature flags to be parsed and transformed into feature management configuration.
public AzureAppConfigurationOptions UseFeatureFlags(Action<FeatureFlagOptions> configure = null)
Parameters
configure
Action<FeatureFlagOptions>A callback used to configure feature flag options.