< Summary

Class:Azure.ResourceManager.Network.ServiceTagsOperations
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\ServiceTagsOperations.cs
Covered lines:0
Uncovered lines:22
Coverable lines:22
Total lines:75
Line coverage:0% (0 of 22)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-0%100%
.ctor()-0%100%
.ctor(...)-0%100%
ListAsync()-0%100%
List(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\ServiceTagsOperations.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 System.Threading;
 10using System.Threading.Tasks;
 11using Azure;
 12using Azure.Core.Pipeline;
 13using Azure.ResourceManager.Network.Models;
 14
 15namespace Azure.ResourceManager.Network
 16{
 17    /// <summary> The ServiceTags service client. </summary>
 18    public partial class ServiceTagsOperations
 19    {
 20        private readonly ClientDiagnostics _clientDiagnostics;
 21        private readonly HttpPipeline _pipeline;
 022        internal ServiceTagsRestOperations RestClient { get; }
 23        /// <summary> Initializes a new instance of ServiceTagsOperations for mocking. </summary>
 024        protected ServiceTagsOperations()
 25        {
 026        }
 27        /// <summary> Initializes a new instance of ServiceTagsOperations. </summary>
 28        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 29        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 30        /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc
 31        /// <param name="endpoint"> server parameter. </param>
 032        internal ServiceTagsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subscriptionId
 33        {
 034            RestClient = new ServiceTagsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
 035            _clientDiagnostics = clientDiagnostics;
 036            _pipeline = pipeline;
 037        }
 38
 39        /// <summary> Gets a list of service tag information resources. </summary>
 40        /// <param name="location"> The location that will be used as a reference for version (not as a filter based on 
 41        /// <param name="cancellationToken"> The cancellation token to use. </param>
 42        public virtual async Task<Response<ServiceTagsListResult>> ListAsync(string location, CancellationToken cancella
 43        {
 044            using var scope = _clientDiagnostics.CreateScope("ServiceTagsOperations.List");
 045            scope.Start();
 46            try
 47            {
 048                return await RestClient.ListAsync(location, cancellationToken).ConfigureAwait(false);
 49            }
 050            catch (Exception e)
 51            {
 052                scope.Failed(e);
 053                throw;
 54            }
 055        }
 56
 57        /// <summary> Gets a list of service tag information resources. </summary>
 58        /// <param name="location"> The location that will be used as a reference for version (not as a filter based on 
 59        /// <param name="cancellationToken"> The cancellation token to use. </param>
 60        public virtual Response<ServiceTagsListResult> List(string location, CancellationToken cancellationToken = defau
 61        {
 062            using var scope = _clientDiagnostics.CreateScope("ServiceTagsOperations.List");
 063            scope.Start();
 64            try
 65            {
 066                return RestClient.List(location, cancellationToken);
 67            }
 068            catch (Exception e)
 69            {
 070                scope.Failed(e);
 071                throw;
 72            }
 073        }
 74    }
 75}