< Summary

Class:Microsoft.Extensions.Azure.EventHubClientBuilderExtensions
Assembly:Azure.Messaging.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.Messaging.EventHubs\src\Compatibility\EventHubClientBuilderExtensions.cs
Covered lines:0
Uncovered lines:8
Coverable lines:8
Total lines:95
Line coverage:0% (0 of 8)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
AddEventHubProducerClient(...)-0%100%
AddEventHubProducerClient(...)-0%100%
AddEventHubProducerClientWithNamespace(...)-0%100%
AddEventHubProducerClient(...)-0%100%
AddEventHubConsumerClient(...)-0%100%
AddEventHubConsumerClient(...)-0%100%
AddEventHubConsumerClientWithNamespace(...)-0%100%
AddEventHubConsumerClient(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.Messaging.EventHubs\src\Compatibility\EventHubClientBuilderExtensions.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.EventHubs.Consumer;
 6using Azure.Messaging.EventHubs.Producer;
 7
 8namespace Microsoft.Extensions.Azure
 9{
 10    /// <summary>
 11    ///    The set of extensions to add the Event Hub client types to the clients builder
 12    /// </summary>
 13    public static class EventHubClientBuilderExtensions
 14    {
 15        /// <summary>
 16        ///   Registers a <see cref="EventHubProducerClient"/> instance with the provided <paramref name="connectionStri
 17        /// </summary>
 18        ///
 19        public static IAzureClientBuilder<EventHubProducerClient, EventHubProducerClientOptions> AddEventHubProducerClie
 20            where TBuilder : IAzureClientFactoryBuilder
 21        {
 022            return builder.RegisterClientFactory<EventHubProducerClient, EventHubProducerClientOptions>(options => new E
 23        }
 24
 25        /// <summary>
 26        ///   Registers a <see cref="EventHubProducerClient"/> instance with the provided <paramref name="connectionStri
 27        /// </summary>
 28        ///
 29        public static IAzureClientBuilder<EventHubProducerClient, EventHubProducerClientOptions> AddEventHubProducerClie
 30            where TBuilder : IAzureClientFactoryBuilder
 31        {
 032            return builder.RegisterClientFactory<EventHubProducerClient, EventHubProducerClientOptions>(options => new E
 33        }
 34
 35        /// <summary>
 36        ///   Registers a <see cref="EventHubProducerClient"/> instance with the provided <paramref name="fullyQualified
 37        /// </summary>
 38        ///
 39        public static IAzureClientBuilder<EventHubProducerClient, EventHubProducerClientOptions> AddEventHubProducerClie
 40            where TBuilder : IAzureClientFactoryBuilderWithCredential
 41        {
 042            return builder.RegisterClientFactory<EventHubProducerClient, EventHubProducerClientOptions>((options, token)
 43        }
 44
 45        /// <summary>
 46        ///   Registers a <see cref="EventHubProducerClient"/> instance with connection options loaded from the provided
 47        /// </summary>
 48        ///
 49        public static IAzureClientBuilder<EventHubProducerClient, EventHubProducerClientOptions> AddEventHubProducerClie
 50            where TBuilder : IAzureClientFactoryBuilderWithConfiguration<TConfiguration>
 51        {
 052            return builder.RegisterClientFactory<EventHubProducerClient, EventHubProducerClientOptions>(configuration);
 53        }
 54
 55        /// <summary>
 56        ///   Registers a <see cref="EventHubConsumerClientOptions"/> instance with the provided <paramref name="connect
 57        /// </summary>
 58        ///
 59        public static IAzureClientBuilder<EventHubConsumerClient, EventHubConsumerClientOptions> AddEventHubConsumerClie
 60            where TBuilder : IAzureClientFactoryBuilder
 61        {
 062            return builder.RegisterClientFactory<EventHubConsumerClient, EventHubConsumerClientOptions>(options => new E
 63        }
 64
 65        /// <summary>
 66        ///   Registers a <see cref="EventHubConsumerClient"/> instance with the provided <paramref name="connectionStri
 67        /// </summary>
 68        ///
 69        public static IAzureClientBuilder<EventHubConsumerClient, EventHubConsumerClientOptions> AddEventHubConsumerClie
 70            where TBuilder : IAzureClientFactoryBuilder
 71        {
 072            return builder.RegisterClientFactory<EventHubConsumerClient, EventHubConsumerClientOptions>(options => new E
 73        }
 74
 75        /// <summary>
 76        ///   Registers a <see cref="EventHubConsumerClient"/> instance with the provided <paramref name="fullyQualified
 77        /// </summary>
 78        ///
 79        public static IAzureClientBuilder<EventHubConsumerClient, EventHubConsumerClientOptions> AddEventHubConsumerClie
 80            where TBuilder : IAzureClientFactoryBuilderWithCredential
 81        {
 082            return builder.RegisterClientFactory<EventHubConsumerClient, EventHubConsumerClientOptions>((options, token)
 83        }
 84
 85        /// <summary>
 86        ///   Registers a <see cref="EventHubConsumerClient"/> instance with connection options loaded from the provided
 87        /// </summary>
 88        ///
 89        public static IAzureClientBuilder<EventHubConsumerClient, EventHubConsumerClientOptions> AddEventHubConsumerClie
 90            where TBuilder : IAzureClientFactoryBuilderWithConfiguration<TConfiguration>
 91        {
 092            return builder.RegisterClientFactory<EventHubConsumerClient, EventHubConsumerClientOptions>(configuration);
 93        }
 94    }
 95}