< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
get_RestClient()-0%100%
.ctor()-0%100%
.ctor(...)-0%100%
<ListAllAsync()-0%100%
<ListAllAsync()-0%100%
ListAllAsync(...)-0%100%
ListAll(...)-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\AzureFirewallFqdnTagsOperations.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;
 13using Azure.Core.Pipeline;
 14using Azure.ResourceManager.Network.Models;
 15
 16namespace Azure.ResourceManager.Network
 17{
 18    /// <summary> The AzureFirewallFqdnTags service client. </summary>
 19    public partial class AzureFirewallFqdnTagsOperations
 20    {
 21        private readonly ClientDiagnostics _clientDiagnostics;
 22        private readonly HttpPipeline _pipeline;
 023        internal AzureFirewallFqdnTagsRestOperations RestClient { get; }
 24        /// <summary> Initializes a new instance of AzureFirewallFqdnTagsOperations for mocking. </summary>
 025        protected AzureFirewallFqdnTagsOperations()
 26        {
 027        }
 28        /// <summary> Initializes a new instance of AzureFirewallFqdnTagsOperations. </summary>
 29        /// <param name="clientDiagnostics"> The handler for diagnostic messaging in the client. </param>
 30        /// <param name="pipeline"> The HTTP pipeline for sending and receiving REST requests and responses. </param>
 31        /// <param name="subscriptionId"> The subscription credentials which uniquely identify the Microsoft Azure subsc
 32        /// <param name="endpoint"> server parameter. </param>
 033        internal AzureFirewallFqdnTagsOperations(ClientDiagnostics clientDiagnostics, HttpPipeline pipeline, string subs
 34        {
 035            RestClient = new AzureFirewallFqdnTagsRestOperations(clientDiagnostics, pipeline, subscriptionId, endpoint);
 036            _clientDiagnostics = clientDiagnostics;
 037            _pipeline = pipeline;
 038        }
 39
 40        /// <summary> Gets all the Azure Firewall FQDN Tags in a subscription. </summary>
 41        /// <param name="cancellationToken"> The cancellation token to use. </param>
 42        public virtual AsyncPageable<AzureFirewallFqdnTag> ListAllAsync(CancellationToken cancellationToken = default)
 43        {
 44            async Task<Page<AzureFirewallFqdnTag>> FirstPageFunc(int? pageSizeHint)
 45            {
 046                using var scope = _clientDiagnostics.CreateScope("AzureFirewallFqdnTagsOperations.ListAll");
 047                scope.Start();
 48                try
 49                {
 050                    var response = await RestClient.ListAllAsync(cancellationToken).ConfigureAwait(false);
 051                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 52                }
 053                catch (Exception e)
 54                {
 055                    scope.Failed(e);
 056                    throw;
 57                }
 058            }
 59            async Task<Page<AzureFirewallFqdnTag>> NextPageFunc(string nextLink, int? pageSizeHint)
 60            {
 061                using var scope = _clientDiagnostics.CreateScope("AzureFirewallFqdnTagsOperations.ListAll");
 062                scope.Start();
 63                try
 64                {
 065                    var response = await RestClient.ListAllNextPageAsync(nextLink, cancellationToken).ConfigureAwait(fal
 066                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 67                }
 068                catch (Exception e)
 69                {
 070                    scope.Failed(e);
 071                    throw;
 72                }
 073            }
 074            return PageableHelpers.CreateAsyncEnumerable(FirstPageFunc, NextPageFunc);
 75        }
 76
 77        /// <summary> Gets all the Azure Firewall FQDN Tags in a subscription. </summary>
 78        /// <param name="cancellationToken"> The cancellation token to use. </param>
 79        public virtual Pageable<AzureFirewallFqdnTag> ListAll(CancellationToken cancellationToken = default)
 80        {
 81            Page<AzureFirewallFqdnTag> FirstPageFunc(int? pageSizeHint)
 82            {
 083                using var scope = _clientDiagnostics.CreateScope("AzureFirewallFqdnTagsOperations.ListAll");
 084                scope.Start();
 85                try
 86                {
 087                    var response = RestClient.ListAll(cancellationToken);
 088                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 89                }
 090                catch (Exception e)
 91                {
 092                    scope.Failed(e);
 093                    throw;
 94                }
 095            }
 96            Page<AzureFirewallFqdnTag> NextPageFunc(string nextLink, int? pageSizeHint)
 97            {
 098                using var scope = _clientDiagnostics.CreateScope("AzureFirewallFqdnTagsOperations.ListAll");
 099                scope.Start();
 100                try
 101                {
 0102                    var response = RestClient.ListAllNextPage(nextLink, cancellationToken);
 0103                    return Page.FromValues(response.Value.Value, response.Value.NextLink, response.GetRawResponse());
 104                }
 0105                catch (Exception e)
 106                {
 0107                    scope.Failed(e);
 0108                    throw;
 109                }
 0110            }
 0111            return PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc);
 112        }
 113    }
 114}