/// <summary>
 /// Create keyvault provider
 /// </summary>
 /// <param name="configuration"></param>
 /// <param name="keyVaultUri"></param>
 /// <param name="allowInteractiveLogon"></param>
 private KeyVaultConfigurationProvider(IConfigurationRoot configuration,
                                       string keyVaultUri, bool allowInteractiveLogon)
 {
     _keyVault    = new KeyVaultClientBootstrap(configuration, allowInteractiveLogon);
     _keyVaultUri = keyVaultUri;
     _cache       = new ConcurrentDictionary <string, Task <SecretBundle> >();
     _reloadToken = new ConfigurationReloadToken();
 }
Example #2
0
 /// <summary>
 /// Create keyvault provider
 /// </summary>
 /// <param name="keyVault"></param>
 /// <param name="keyVaultUri"></param>
 private KeyVaultConfigurationProvider(KeyVaultClient keyVault,
                                       string keyVaultUri)
 {
     _keyVault    = keyVault;
     _keyVaultUri = keyVaultUri;
     _cache       = new ConcurrentDictionary <string, Task <SecretBundle> >();
     _reloadToken = new ConfigurationReloadToken();
 }
        private void RaiseChanged()
        {
            ConfigurationReloadToken previousToken = Interlocked.Exchange(ref _changeToken, new ConfigurationReloadToken());

            previousToken.OnReload();
        }
Example #4
0
        /// <summary>
        /// Triggers the reload change token and creates a new one.
        /// </summary>
        protected void OnReload()
        {
            ConfigurationReloadToken previousToken = Interlocked.Exchange(ref _reloadToken, new ConfigurationReloadToken());

            previousToken.OnReload();
        }