< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-0%100%
.ctor()-0%100%
.ctor(...)-0%100%
StartListAsync()-0%0%
StartList(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\VpnServerConfigurationsAssociatedWithVirtualWanOperations.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.Core.Pipeline;
 12
 13namespace Azure.ResourceManager.Network
 14{
 15    /// <summary> The VpnServerConfigurationsAssociatedWithVirtualWan service client. </summary>
 16    public partial class VpnServerConfigurationsAssociatedWithVirtualWanOperations
 17    {
 18        private readonly ClientDiagnostics _clientDiagnostics;
 19        private readonly HttpPipeline _pipeline;
 020        internal VpnServerConfigurationsAssociatedWithVirtualWanRestOperations RestClient { get; }
 21        /// <summary> Initializes a new instance of VpnServerConfigurationsAssociatedWithVirtualWanOperations for mockin
 022        protected VpnServerConfigurationsAssociatedWithVirtualWanOperations()
 23        {
 024        }
 25        /// <summary> Initializes a new instance of VpnServerConfigurationsAssociatedWithVirtualWanOperations. </summary
 26        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 27        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 28        /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc
 29        /// <param name="endpoint"> server parameter. </param>
 030        internal VpnServerConfigurationsAssociatedWithVirtualWanOperations(ClientDiagnostics clientDiagnostics, HttpPipe
 31        {
 032            RestClient = new VpnServerConfigurationsAssociatedWithVirtualWanRestOperations(clientDiagnostics, pipeline, 
 033            _clientDiagnostics = clientDiagnostics;
 034            _pipeline = pipeline;
 035        }
 36
 37        /// <summary> Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. </summa
 38        /// <param name="resourceGroupName"> The resource group name. </param>
 39        /// <param name="virtualWANName"> The name of the VirtualWAN whose associated VpnServerConfigurations is needed.
 40        /// <param name="cancellationToken"> The cancellation token to use. </param>
 41        public virtual async Task<VpnServerConfigurationsAssociatedWithVirtualWanListOperation> StartListAsync(string re
 42        {
 043            if (resourceGroupName == null)
 44            {
 045                throw new ArgumentNullException(nameof(resourceGroupName));
 46            }
 047            if (virtualWANName == null)
 48            {
 049                throw new ArgumentNullException(nameof(virtualWANName));
 50            }
 51
 052            using var scope = _clientDiagnostics.CreateScope("VpnServerConfigurationsAssociatedWithVirtualWanOperations.
 053            scope.Start();
 54            try
 55            {
 056                var originalResponse = await RestClient.ListAsync(resourceGroupName, virtualWANName, cancellationToken).
 057                return new VpnServerConfigurationsAssociatedWithVirtualWanListOperation(_clientDiagnostics, _pipeline, R
 58            }
 059            catch (Exception e)
 60            {
 061                scope.Failed(e);
 062                throw;
 63            }
 064        }
 65
 66        /// <summary> Gives the list of VpnServerConfigurations associated with Virtual Wan in a resource group. </summa
 67        /// <param name="resourceGroupName"> The resource group name. </param>
 68        /// <param name="virtualWANName"> The name of the VirtualWAN whose associated VpnServerConfigurations is needed.
 69        /// <param name="cancellationToken"> The cancellation token to use. </param>
 70        public virtual VpnServerConfigurationsAssociatedWithVirtualWanListOperation StartList(string resourceGroupName, 
 71        {
 072            if (resourceGroupName == null)
 73            {
 074                throw new ArgumentNullException(nameof(resourceGroupName));
 75            }
 076            if (virtualWANName == null)
 77            {
 078                throw new ArgumentNullException(nameof(virtualWANName));
 79            }
 80
 081            using var scope = _clientDiagnostics.CreateScope("VpnServerConfigurationsAssociatedWithVirtualWanOperations.
 082            scope.Start();
 83            try
 84            {
 085                var originalResponse = RestClient.List(resourceGroupName, virtualWANName, cancellationToken);
 086                return new VpnServerConfigurationsAssociatedWithVirtualWanListOperation(_clientDiagnostics, _pipeline, R
 87            }
 088            catch (Exception e)
 89            {
 090                scope.Failed(e);
 091                throw;
 92            }
 093        }
 94    }
 95}