Share via


你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

AzureAppConfigurationRefreshOptions 类

定义

用于配置Azure 应用程序配置提供程序的刷新行为的选项。

public class AzureAppConfigurationRefreshOptions
type AzureAppConfigurationRefreshOptions = class
Public Class AzureAppConfigurationRefreshOptions
继承
AzureAppConfigurationRefreshOptions

构造函数

AzureAppConfigurationRefreshOptions()

用于配置Azure 应用程序配置提供程序的刷新行为的选项。

方法

Register(String, Boolean)

注册要在配置提供程序 IConfigurationRefresher 触发刷新时刷新的指定键值。 IConfigurationRefresher可以通过调用 GetRefresher()获取实例。

Register(String, String, Boolean)

注册要在配置提供程序 IConfigurationRefresher 触发刷新时刷新的指定键值。 IConfigurationRefresher可以通过调用 GetRefresher()获取实例。

SetCacheExpiration(TimeSpan)

设置注册用于刷新的键值的缓存过期时间。 默认值为 30 秒。 必须大于 1 秒。 使用 IConfigurationRefresher 触发的任何刷新操作都不会更新密钥的值,直到该密钥的缓存值过期。

适用于