< Summary

Class:Azure.ResourceManager.KeyVault.PrivateLinkResourcesOperations
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\PrivateLinkResourcesOperations.cs
Covered lines:0
Uncovered lines:22
Coverable lines:22
Total lines:78
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%
ListByVaultAsync()-0%100%
ListByVault(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\PrivateLinkResourcesOperations.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.KeyVault.Models;
 14
 15namespace Azure.ResourceManager.KeyVault
 16{
 17    /// <summary> The PrivateLinkResources service client. </summary>
 18    public partial class PrivateLinkResourcesOperations
 19    {
 20        private readonly ClientDiagnostics _clientDiagnostics;
 21        private readonly HttpPipeline _pipeline;
 022        internal PrivateLinkResourcesRestOperations RestClient { get; }
 23        /// <summary> Initializes a new instance of PrivateLinkResourcesOperations for mocking. </summary>
 024        protected PrivateLinkResourcesOperations()
 25        {
 026        }
 27        /// <summary> Initializes a new instance of PrivateLinkResourcesOperations. </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"> Subscription credentials which uniquely identify Microsoft Azure subscription.
 31        /// <param name="endpoint"> server parameter. </param>
 32        /// <param name="apiVersion"> Api Version. </param>
 033        internal PrivateLinkResourcesOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subsc
 34        {
 035            RestClient = new PrivateLinkResourcesRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint, a
 036            _clientDiagnostics = clientDiagnostics;
 037            _pipeline = pipeline;
 038        }
 39
 40        /// <summary> Gets the private link resources supported for the key vault. </summary>
 41        /// <param name="resourceGroupName"> Name of the resource group that contains the key vault. </param>
 42        /// <param name="vaultName"> The name of the key vault. </param>
 43        /// <param name="cancellationToken"> The cancellation token to use. </param>
 44        public virtual async Task<Response<PrivateLinkResourceListResult>> ListByVaultAsync(string resourceGroupName, st
 45        {
 046            using var scope = _clientDiagnostics.CreateScope("PrivateLinkResourcesOperations.ListByVault");
 047            scope.Start();
 48            try
 49            {
 050                return await RestClient.ListByVaultAsync(resourceGroupName, vaultName, cancellationToken).ConfigureAwait
 51            }
 052            catch (Exception e)
 53            {
 054                scope.Failed(e);
 055                throw;
 56            }
 057        }
 58
 59        /// <summary> Gets the private link resources supported for the key vault. </summary>
 60        /// <param name="resourceGroupName"> Name of the resource group that contains the key vault. </param>
 61        /// <param name="vaultName"> The name of the key vault. </param>
 62        /// <param name="cancellationToken"> The cancellation token to use. </param>
 63        public virtual Response<PrivateLinkResourceListResult> ListByVault(string resourceGroupName, string vaultName, C
 64        {
 065            using var scope = _clientDiagnostics.CreateScope("PrivateLinkResourcesOperations.ListByVault");
 066            scope.Start();
 67            try
 68            {
 069                return RestClient.ListByVault(resourceGroupName, vaultName, cancellationToken);
 70            }
 071            catch (Exception e)
 72            {
 073                scope.Failed(e);
 074                throw;
 75            }
 076        }
 77    }
 78}