开发者

Does CloudStorageAccount automatically pick-up configuration changes?

开发者 https://www.devze.com 2023-02-17 15:13 出处:网络
I\'ve setup my ConfigurationSettingPublisher and can call FromConfigurationSetting to get my CloudStorageAccoun开发者_如何学Ct inline with the current configuration - all good.

I've setup my ConfigurationSettingPublisher and can call FromConfigurationSetting to get my CloudStorageAccoun开发者_如何学Ct inline with the current configuration - all good.

CloudStorageAccount.SetConfigurationSettingPublisher(
            (configName, configSettingPublisher) =>
                {
                    string connectionString = RoleEnvironment.GetConfigurationSettingValue(configName);
                    configSettingPublisher(connectionString);
                });

        CloudStorageAccount storageAccount =
            CloudStorageAccount.FromConfigurationSetting("DataConnectionString");

When a configuration change occurs on a deployed package, will that change propagate through to the storageAccount instance above, or do I need to call CloudStorageAccount.FromConfigurationSetting("DataConnectionString") again and recreate it?


No, you would need to call CloudStorageAccount::FromConfigurationSetting to get a new CloudStorageAccount instance with the new settings.

0

精彩评论

暂无评论...
验证码 换一张
取 消