< Summary

Class:Microsoft.Extensions.Azure.SecretClientBuilderExtensions
Assembly:Azure.Security.KeyVault.Secrets
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Secrets\src\SecretClientBuilderExtensions.cs
Covered lines:0
Uncovered lines:2
Coverable lines:2
Total lines:33
Line coverage:0% (0 of 2)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
AddSecretClient(...)-0%100%
AddSecretClient(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.Security.KeyVault.Secrets\src\SecretClientBuilderExtensions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5using Azure.Core.Extensions;
 6using Azure.Security.KeyVault.Secrets;
 7
 8namespace Microsoft.Extensions.Azure
 9{
 10    /// <summary>
 11    /// Extension methods to add <see cref="SecretClient"/> to clients builder.
 12    /// </summary>
 13    public static class SecretClientBuilderExtensions
 14    {
 15        /// <summary>
 16        /// Registers a <see cref="SecretClient"/> instance with the provided <paramref name="vaultUri"/>
 17        /// </summary>
 18        public static IAzureClientBuilder<SecretClient, SecretClientOptions> AddSecretClient<TBuilder>(this TBuilder bui
 19            where TBuilder : IAzureClientFactoryBuilderWithCredential
 20        {
 021            return builder.RegisterClientFactory<SecretClient, SecretClientOptions>((options, cred) => new SecretClient(
 22        }
 23
 24        /// <summary>
 25        /// Registers a <see cref="SecretClient"/> instance with connection options loaded from the provided <paramref n
 26        /// </summary>
 27        public static IAzureClientBuilder<SecretClient, SecretClientOptions> AddSecretClient<TBuilder, TConfiguration>(t
 28            where TBuilder : IAzureClientFactoryBuilderWithConfiguration<TConfiguration>
 29        {
 030            return builder.RegisterClientFactory<SecretClient, SecretClientOptions>(configuration);
 31        }
 32    }
 33}