< Summary

Class:Azure.Extensions.AspNetCore.Configuration.Secrets.AzureKeyVaultConfigurationOptions
Assembly:Azure.Extensions.AspNetCore.Configuration.Secrets
File(s):C:\Git\azure-sdk-for-net\sdk\extensions\Azure.Extensions.AspNetCore.Configuration.Secrets\src\AzureKeyVaultConfigurationOptions.cs
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:51
Line coverage:0% (0 of 9)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Client()-0%100%
get_Manager()-0%100%
get_ReloadInterval()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\extensions\Azure.Extensions.AspNetCore.Configuration.Secrets\src\AzureKeyVaultConfigurationOptions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using Azure.Core;
 6using Azure.Security.KeyVault.Secrets;
 7using Microsoft.Extensions.Configuration;
 8
 9namespace Azure.Extensions.AspNetCore.Configuration.Secrets
 10{
 11    /// <summary>
 12    /// Options class used by the <see cref="AzureKeyVaultConfigurationExtensions"/>.
 13    /// </summary>
 14    internal class AzureKeyVaultConfigurationOptions
 15    {
 16        /// <summary>
 17        /// Creates a new instance of <see cref="AzureKeyVaultConfigurationOptions"/>.
 18        /// </summary>
 019        public AzureKeyVaultConfigurationOptions()
 20        {
 021            Manager = KeyVaultSecretManager.Instance;
 022        }
 23
 24        /// <summary>
 25        /// Creates a new instance of <see cref="AzureKeyVaultConfigurationOptions"/>.
 26        /// </summary>
 27        /// <param name="vaultUri">Azure Key Vault uri.</param>
 28        /// <param name="credential">The <see cref="TokenCredential"/> to use for authentication.</param>
 29        public AzureKeyVaultConfigurationOptions(
 30            Uri vaultUri,
 031            TokenCredential credential) : this()
 32        {
 033            Client = new SecretClient(vaultUri, credential);
 034        }
 35
 36        /// <summary>
 37        /// Gets or sets the <see cref="SecretClient"/> to use for retrieving values.
 38        /// </summary>
 039        public SecretClient Client { get; set; }
 40
 41        /// <summary>
 42        /// Gets or sets the <see cref="KeyVaultSecretManager"/> instance used to control secret loading.
 43        /// </summary>
 044        public KeyVaultSecretManager Manager { get; set; }
 45
 46        /// <summary>
 47        /// Gets or sets the timespan to wait between attempts at polling the Azure Key Vault for changes. <code>null</c
 48        /// </summary>
 049        public TimeSpan? ReloadInterval { get; set; }
 50    }
 51}