| | | 1 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | | 2 | | // Licensed under the MIT License. |
| | | 3 | | |
| | | 4 | | using Microsoft.Extensions.Configuration; |
| | | 5 | | |
| | | 6 | | namespace Azure.Extensions.AspNetCore.Configuration.Secrets |
| | | 7 | | { |
| | | 8 | | /// <summary> |
| | | 9 | | /// Represents Azure Key Vault secrets as an <see cref="IConfigurationSource"/>. |
| | | 10 | | /// </summary> |
| | | 11 | | internal class AzureKeyVaultConfigurationSource : IConfigurationSource |
| | | 12 | | { |
| | | 13 | | private readonly AzureKeyVaultConfigurationOptions _options; |
| | | 14 | | |
| | 0 | 15 | | public AzureKeyVaultConfigurationSource(AzureKeyVaultConfigurationOptions options) |
| | | 16 | | { |
| | 0 | 17 | | _options = options; |
| | 0 | 18 | | } |
| | | 19 | | |
| | | 20 | | /// <inheritdoc /> |
| | | 21 | | public IConfigurationProvider Build(IConfigurationBuilder builder) |
| | | 22 | | { |
| | 0 | 23 | | return new AzureKeyVaultConfigurationProvider(_options.Client, _options.Manager, _options.ReloadInterval); |
| | | 24 | | } |
| | | 25 | | } |
| | | 26 | | } |