< Summary

Class:Azure.ResourceManager.Network.ResourceNavigationLinksOperations
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\ResourceNavigationLinksOperations.cs
Covered lines:0
Uncovered lines:22
Coverable lines:22
Total lines:79
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\ResourceNavigationLinksOperations.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 ResourceNavigationLinks service client. </summary>
 18    public partial class ResourceNavigationLinksOperations
 19    {
 20        private readonly ClientDiagnostics _clientDiagnostics;
 21        private readonly HttpPipeline _pipeline;
 022        internal ResourceNavigationLinksRestOperations RestClient { get; }
 23        /// <summary> Initializes a new instance of ResourceNavigationLinksOperations for mocking. </summary>
 024        protected ResourceNavigationLinksOperations()
 25        {
 026        }
 27        /// <summary> Initializes a new instance of ResourceNavigationLinksOperations. </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 ResourceNavigationLinksOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string su
 33        {
 034            RestClient = new ResourceNavigationLinksRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint
 035            _clientDiagnostics = clientDiagnostics;
 036            _pipeline = pipeline;
 037        }
 38
 39        /// <summary> Gets a list of resource navigation links for a subnet. </summary>
 40        /// <param name="resourceGroupName"> The name of the resource group. </param>
 41        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 42        /// <param name="subnetName"> The name of the subnet. </param>
 43        /// <param name="cancellationToken"> The cancellation token to use. </param>
 44        public virtual async Task<Response<ResourceNavigationLinksListResult>> ListAsync(string resourceGroupName, strin
 45        {
 046            using var scope = _clientDiagnostics.CreateScope("ResourceNavigationLinksOperations.List");
 047            scope.Start();
 48            try
 49            {
 050                return await RestClient.ListAsync(resourceGroupName, virtualNetworkName, subnetName, cancellationToken).
 51            }
 052            catch (Exception e)
 53            {
 054                scope.Failed(e);
 055                throw;
 56            }
 057        }
 58
 59        /// <summary> Gets a list of resource navigation links for a subnet. </summary>
 60        /// <param name="resourceGroupName"> The name of the resource group. </param>
 61        /// <param name="virtualNetworkName"> The name of the virtual network. </param>
 62        /// <param name="subnetName"> The name of the subnet. </param>
 63        /// <param name="cancellationToken"> The cancellation token to use. </param>
 64        public virtual Response<ResourceNavigationLinksListResult> List(string resourceGroupName, string virtualNetworkN
 65        {
 066            using var scope = _clientDiagnostics.CreateScope("ResourceNavigationLinksOperations.List");
 067            scope.Start();
 68            try
 69            {
 070                return RestClient.List(resourceGroupName, virtualNetworkName, subnetName, cancellationToken);
 71            }
 072            catch (Exception e)
 73            {
 074                scope.Failed(e);
 075                throw;
 76            }
 077        }
 78    }
 79}