< Summary

Class:Microsoft.Extensions.Azure.QueueClientBuilderExtensions
Assembly:Azure.Storage.Queues
File(s):C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Queues\src\QueueClientBuilderExtensions.cs
Covered lines:0
Uncovered lines:6
Coverable lines:6
Total lines:54
Line coverage:0% (0 of 6)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\storage\Azure.Storage.Queues\src\QueueClientBuilderExtensions.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.Storage;
 7using Azure.Storage.Queues;
 8
 9namespace Microsoft.Extensions.Azure
 10{
 11    /// <summary>
 12    /// Extension methods to add <see cref="QueueClientOptions"/> client to clients builder
 13    /// </summary>
 14    public static class QueueClientBuilderExtensions
 15    {
 16        /// <summary>
 17        /// Registers a <see cref="QueueServiceClient"/> instance with the provided <paramref name="connectionString"/>
 18        /// </summary>
 19        public static IAzureClientBuilder<QueueServiceClient, QueueClientOptions> AddQueueServiceClient<TBuilder>(this T
 20            where TBuilder : IAzureClientFactoryBuilder
 21        {
 022            return builder.RegisterClientFactory<QueueServiceClient, QueueClientOptions>(options => new QueueServiceClie
 23        }
 24
 25        /// <summary>
 26        /// Registers a <see cref="QueueServiceClient"/> instance with the provided <paramref name="serviceUri"/>
 27        /// </summary>
 28        public static IAzureClientBuilder<QueueServiceClient, QueueClientOptions> AddQueueServiceClient<TBuilder>(this T
 29            where TBuilder : IAzureClientFactoryBuilderWithCredential
 30        {
 031            return builder.RegisterClientFactory<QueueServiceClient, QueueClientOptions>(
 032                (options, token) => token != null ? new QueueServiceClient(serviceUri, token, options) : new QueueServic
 033                requiresCredential: false);
 34        }
 35
 36        /// <summary>
 37        /// Registers a <see cref="QueueServiceClient"/> instance with the provided <paramref name="serviceUri"/> and <p
 38        /// </summary>
 39        public static IAzureClientBuilder<QueueServiceClient, QueueClientOptions> AddQueueServiceClient<TBuilder>(this T
 40            where TBuilder : IAzureClientFactoryBuilder
 41        {
 042            return builder.RegisterClientFactory<QueueServiceClient, QueueClientOptions>(options => new QueueServiceClie
 43        }
 44
 45        /// <summary>
 46        /// Registers a <see cref="QueueServiceClient"/> instance with connection options loaded from the provided <para
 47        /// </summary>
 48        public static IAzureClientBuilder<QueueServiceClient, QueueClientOptions> AddQueueServiceClient<TBuilder, TConfi
 49            where TBuilder : IAzureClientFactoryBuilderWithConfiguration<TConfiguration>
 50        {
 051            return builder.RegisterClientFactory<QueueServiceClient, QueueClientOptions>(configuration);
 52        }
 53    }
 54}