< Summary

Class:Microsoft.Extensions.Azure.ServiceBusClientBuilderExtensions
Assembly:Azure.Messaging.ServiceBus
File(s):C:\Git\azure-sdk-for-net\sdk\servicebus\Azure.Messaging.ServiceBus\src\Compatibility\ServiceBusClientBuilderExtensions.cs
Covered lines:0
Uncovered lines:3
Coverable lines:3
Total lines:44
Line coverage:0% (0 of 3)
Covered branches:0
Total branches:0

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\servicebus\Azure.Messaging.ServiceBus\src\Compatibility\ServiceBusClientBuilderExtensions.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using Azure.Core.Extensions;
 5using Azure.Messaging.ServiceBus;
 6
 7namespace Microsoft.Extensions.Azure
 8{
 9    /// <summary>
 10    ///    The set of extensions to add the Service Bus client types to the clients builder
 11    /// </summary>
 12    public static class ServiceBusClientBuilderExtensions
 13    {
 14        /// <summary>
 15        ///   Registers a <see cref="ServiceBusClient "/> instance with the provided <paramref name="connectionString"/>
 16        /// </summary>
 17        ///
 18        public static IAzureClientBuilder<ServiceBusClient, ServiceBusClientOptions> AddServiceBusClient<TBuilder>(this 
 19            where TBuilder : IAzureClientFactoryBuilder
 20        {
 021            return builder.RegisterClientFactory<ServiceBusClient, ServiceBusClientOptions>(options => new ServiceBusCli
 22        }
 23
 24        /// <summary>
 25        ///   Registers a <see cref="ServiceBusClient"/> instance with the provided <paramref name="fullyQualifiedNamesp
 26        /// </summary>
 27        ///
 28        public static IAzureClientBuilder<ServiceBusClient, ServiceBusClientOptions> AddServiceBusClientWithNamespace<TB
 29            where TBuilder : IAzureClientFactoryBuilderWithCredential
 30        {
 031            return builder.RegisterClientFactory<ServiceBusClient, ServiceBusClientOptions>((options, token) => new Serv
 32        }
 33
 34        /// <summary>
 35        ///   Registers a <see cref="ServiceBusClient"/> instance with connection options loaded from the provided <para
 36        /// </summary>
 37        ///
 38        public static IAzureClientBuilder<ServiceBusClient, ServiceBusClientOptions> AddServiceBusClient<TBuilder, TConf
 39            where TBuilder : IAzureClientFactoryBuilderWithConfiguration<TConfiguration>
 40        {
 041            return builder.RegisterClientFactory<ServiceBusClient, ServiceBusClientOptions>(configuration);
 42        }
 43    }
 44}