< Summary

Class:Azure.ResourceManager.DigitalTwins.DigitalTwinsManagementClient
Assembly:Azure.ResourceManager.DigitalTwins
File(s):C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\DigitalTwinsManagementClient.cs
Covered lines:14
Uncovered lines:3
Coverable lines:17
Total lines:65
Line coverage:82.3% (14 of 17)
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_DigitalTwins()-100%100%
get_DigitalTwinsEndpoint()-0%100%
get_Operations()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\digitaltwins\Azure.ResourceManager.DigitalTwins\src\Generated\DigitalTwinsManagementClient.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.DigitalTwins;
 12
 13namespace Azure.ResourceManager.DigitalTwins
 14{
 15    /// <summary> DigitalTwins service management client. </summary>
 16    public class DigitalTwinsManagementClient
 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 DigitalTwinsManagementClient for mocking. </summary>
 424        protected DigitalTwinsManagementClient()
 25        {
 426        }
 27
 28        /// <summary> Initializes a new instance of DigitalTwinsManagementClient. </summary>
 29        /// <param name="subscriptionId"> The subscription identifier. </param>
 30        /// <param name="tokenCredential"> The OAuth token for making client requests. </param>
 31        /// <param name="options"> The options for configuring the client. </param>
 432        public DigitalTwinsManagementClient(string subscriptionId, TokenCredential tokenCredential, DigitalTwinsManageme
 33        {
 434        }
 35        /// <summary> Initializes a new instance of DigitalTwinsManagementClient. </summary>
 36        /// <param name="subscriptionId"> The subscription identifier. </param>
 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"> <paramref name="subscriptionId"/> is null. </exception>
 441        public DigitalTwinsManagementClient(string subscriptionId, Uri endpoint, TokenCredential tokenCredential, Digita
 42        {
 443            if (subscriptionId == null)
 44            {
 045                throw new ArgumentNullException(nameof(subscriptionId));
 46            }
 447            endpoint ??= new Uri("https://management.azure.com");
 48
 449            options ??= new DigitalTwinsManagementClientOptions();
 450            _clientDiagnostics = new ClientDiagnostics(options);
 451            _pipeline = ManagementPipelineBuilder.Build(tokenCredential, endpoint, options);
 452            _subscriptionId = subscriptionId;
 453            _endpoint = endpoint;
 454        }
 55
 56        /// <summary> Returns an instance of DigitalTwinsOperations. </summary>
 2057        public virtual DigitalTwinsOperations DigitalTwins => new DigitalTwinsOperations(_clientDiagnostics, _pipeline, 
 58
 59        /// <summary> Returns an instance of DigitalTwinsEndpointOperations. </summary>
 060        public virtual DigitalTwinsEndpointOperations DigitalTwinsEndpoint => new DigitalTwinsEndpointOperations(_client
 61
 62        /// <summary> Returns an instance of Operations. </summary>
 063        public virtual Operations Operations => new Operations(_clientDiagnostics, _pipeline, _endpoint);
 64    }
 65}