< Summary

Class:Azure.ResourceManager.EventHubs.EventHubsManagementClient
Assembly:Azure.ResourceManager.EventHubs
File(s):C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\EventHubsManagementClient.cs
Covered lines:18
Uncovered lines:4
Coverable lines:22
Total lines:80
Line coverage:81.8% (18 of 22)
Covered branches:4
Total branches:6
Branch coverage:66.6% (4 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-100%100%
.ctor(...)-90%66.67%
get_Clusters()-0%100%
get_Namespaces()-100%100%
get_Configuration()-0%100%
get_DisasterRecoveryConfigs()-100%100%
get_EventHubs()-100%100%
get_ConsumerGroups()-100%100%
get_Operations()-100%100%
get_Regions()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\eventhub\Azure.ResourceManager.EventHubs\src\Generated\EventHubsManagementClient.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9using Azure.Core;
 10using Azure.Core.Pipeline;
 11using Azure.ResourceManager.EventHubs;
 12
 13namespace Azure.ResourceManager.EventHubs
 14{
 15    /// <summary> EventHubs service management client. </summary>
 16    public class EventHubsManagementClient
 17    {
 18        private readonly ClientDiagnostics _clientDiagnostics;
 19        private readonly HttpPipeline _pipeline;
 20        private readonly string _subscriptionId;
 21        private readonly Uri _endpoint;
 22
 23        /// <summary> Initializes a new instance of EventHubsManagementClient for mocking. </summary>
 4824        protected EventHubsManagementClient()
 25        {
 4826        }
 27
 28        /// <summary> Initializes a new instance of EventHubsManagementClient. </summary>
 29        /// <param name="subscriptionId"> Subscription credentials that uniquely identify a Microsoft Azure subscription
 30        /// <param name="tokenCredential"> The OAuth token for making client requests. </param>
 31        /// <param name="options"> The options for configuring the client. </param>
 4832        public EventHubsManagementClient(string subscriptionId, TokenCredential tokenCredential, EventHubsManagementClie
 33        {
 4834        }
 35        /// <summary> Initializes a new instance of EventHubsManagementClient. </summary>
 36        /// <param name="subscriptionId"> Subscription credentials that uniquely identify a Microsoft Azure subscription
 37        /// <param name="endpoint"> server parameter. </param>
 38        /// <param name="tokenCredential"> The OAuth token for making client requests. </param>
 39        /// <param name="options"> The options for configuring the client. </param>
 40        /// <exception cref="ArgumentNullException"> This occurs when one of the required arguments is null. </exception
 4841        public EventHubsManagementClient(string subscriptionId, Uri endpoint, TokenCredential tokenCredential, EventHubs
 42        {
 4843            if (subscriptionId == null)
 44            {
 045                throw new ArgumentNullException(nameof(subscriptionId));
 46            }
 4847            endpoint ??= new Uri("https://management.azure.com");
 48
 4849            options ??= new EventHubsManagementClientOptions();
 4850            _clientDiagnostics = new ClientDiagnostics(options);
 4851            _pipeline = ManagementPipelineBuilder.Build(tokenCredential, endpoint, options);
 4852            _subscriptionId = subscriptionId;
 4853            _endpoint = endpoint;
 4854        }
 55
 56        /// <summary> Returns an instance of ClustersOperations. </summary>
 057        public virtual ClustersOperations Clusters => new ClustersOperations(_clientDiagnostics, _pipeline, _subscriptio
 58
 59        /// <summary> Returns an instance of NamespacesOperations. </summary>
 4860        public virtual NamespacesOperations Namespaces => new NamespacesOperations(_clientDiagnostics, _pipeline, _subsc
 61
 62        /// <summary> Returns an instance of ConfigurationOperations. </summary>
 063        public virtual ConfigurationOperations Configuration => new ConfigurationOperations(_clientDiagnostics, _pipelin
 64
 65        /// <summary> Returns an instance of DisasterRecoveryConfigsOperations. </summary>
 4866        public virtual DisasterRecoveryConfigsOperations DisasterRecoveryConfigs => new DisasterRecoveryConfigsOperation
 67
 68        /// <summary> Returns an instance of EventHubsOperations. </summary>
 4869        public virtual EventHubsOperations EventHubs => new EventHubsOperations(_clientDiagnostics, _pipeline, _subscrip
 70
 71        /// <summary> Returns an instance of ConsumerGroupsOperations. </summary>
 4872        public virtual ConsumerGroupsOperations ConsumerGroups => new ConsumerGroupsOperations(_clientDiagnostics, _pipe
 73
 74        /// <summary> Returns an instance of Operations. </summary>
 4875        public virtual Operations Operations => new Operations(_clientDiagnostics, _pipeline, _endpoint);
 76
 77        /// <summary> Returns an instance of RegionsOperations. </summary>
 078        public virtual RegionsOperations Regions => new RegionsOperations(_clientDiagnostics, _pipeline, _subscriptionId
 79    }
 80}