< Summary

Class:Azure.ResourceManager.Network.VpnSiteLinkConnectionsOperations
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\VpnSiteLinkConnectionsOperations.cs
Covered lines:0
Uncovered lines:22
Coverable lines:22
Total lines:81
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%
GetAsync()-0%100%
Get(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\VpnSiteLinkConnectionsOperations.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 VpnSiteLinkConnections service client. </summary>
 18    public partial class VpnSiteLinkConnectionsOperations
 19    {
 20        private readonly ClientDiagnostics _clientDiagnostics;
 21        private readonly HttpPipeline _pipeline;
 022        internal VpnSiteLinkConnectionsRestOperations RestClient { get; }
 23        /// <summary> Initializes a new instance of VpnSiteLinkConnectionsOperations for mocking. </summary>
 024        protected VpnSiteLinkConnectionsOperations()
 25        {
 026        }
 27        /// <summary> Initializes a new instance of VpnSiteLinkConnectionsOperations. </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 VpnSiteLinkConnectionsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string sub
 33        {
 034            RestClient = new VpnSiteLinkConnectionsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint)
 035            _clientDiagnostics = clientDiagnostics;
 036            _pipeline = pipeline;
 037        }
 38
 39        /// <summary> Retrieves the details of a vpn site link connection. </summary>
 40        /// <param name="resourceGroupName"> The resource group name of the VpnGateway. </param>
 41        /// <param name="gatewayName"> The name of the gateway. </param>
 42        /// <param name="connectionName"> The name of the vpn connection. </param>
 43        /// <param name="linkConnectionName"> The name of the vpn connection. </param>
 44        /// <param name="cancellationToken"> The cancellation token to use. </param>
 45        public virtual async Task<Response<VpnSiteLinkConnection>> GetAsync(string resourceGroupName, string gatewayName
 46        {
 047            using var scope = _clientDiagnostics.CreateScope("VpnSiteLinkConnectionsOperations.Get");
 048            scope.Start();
 49            try
 50            {
 051                return await RestClient.GetAsync(resourceGroupName, gatewayName, connectionName, linkConnectionName, can
 52            }
 053            catch (Exception e)
 54            {
 055                scope.Failed(e);
 056                throw;
 57            }
 058        }
 59
 60        /// <summary> Retrieves the details of a vpn site link connection. </summary>
 61        /// <param name="resourceGroupName"> The resource group name of the VpnGateway. </param>
 62        /// <param name="gatewayName"> The name of the gateway. </param>
 63        /// <param name="connectionName"> The name of the vpn connection. </param>
 64        /// <param name="linkConnectionName"> The name of the vpn connection. </param>
 65        /// <param name="cancellationToken"> The cancellation token to use. </param>
 66        public virtual Response<VpnSiteLinkConnection> Get(string resourceGroupName, string gatewayName, string connecti
 67        {
 068            using var scope = _clientDiagnostics.CreateScope("VpnSiteLinkConnectionsOperations.Get");
 069            scope.Start();
 70            try
 71            {
 072                return RestClient.Get(resourceGroupName, gatewayName, connectionName, linkConnectionName, cancellationTo
 73            }
 074            catch (Exception e)
 75            {
 076                scope.Failed(e);
 077                throw;
 78            }
 079        }
 80    }
 81}