< Summary

Class:Azure.ResourceManager.AppConfiguration.Models.PrivateLinkResourceListResult
Assembly:Azure.ResourceManager.AppConfiguration
File(s):C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateLinkResourceListResult.cs
C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateLinkResourceListResult.Serialization.cs
Covered lines:20
Uncovered lines:4
Coverable lines:24
Total lines:90
Line coverage:83.3% (20 of 24)
Covered branches:12
Total branches:14
Branch coverage:85.7% (12 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Value()-100%100%
get_NextLink()-100%100%
DeserializePrivateLinkResourceListResult(...)-87.5%85.71%

File(s)

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateLinkResourceListResult.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.Collections.Generic;
 9
 10namespace Azure.ResourceManager.AppConfiguration.Models
 11{
 12    /// <summary> A list of private link resources. </summary>
 13    public partial class PrivateLinkResourceListResult
 14    {
 15        /// <summary> Initializes a new instance of PrivateLinkResourceListResult. </summary>
 016        internal PrivateLinkResourceListResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of PrivateLinkResourceListResult. </summary>
 21        /// <param name="value"> The collection value. </param>
 22        /// <param name="nextLink"> The URI that can be used to request the next set of paged results. </param>
 1223        internal PrivateLinkResourceListResult(IReadOnlyList<PrivateLinkResource> value, string nextLink)
 24        {
 1225            Value = value;
 1226            NextLink = nextLink;
 1227        }
 28
 29        /// <summary> The collection value. </summary>
 1230        public IReadOnlyList<PrivateLinkResource> Value { get; }
 31        /// <summary> The URI that can be used to request the next set of paged results. </summary>
 1232        public string NextLink { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\appconfiguration\Azure.ResourceManager.AppConfiguration\src\Generated\Models\PrivateLinkResourceListResult.Serialization.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.ResourceManager.AppConfiguration.Models
 13{
 14    public partial class PrivateLinkResourceListResult
 15    {
 16        internal static PrivateLinkResourceListResult DeserializePrivateLinkResourceListResult(JsonElement element)
 17        {
 1218            IReadOnlyList<PrivateLinkResource> value = default;
 1219            string nextLink = default;
 7220            foreach (var property in element.EnumerateObject())
 21            {
 2422                if (property.NameEquals("value"))
 23                {
 1224                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 1228                    List<PrivateLinkResource> array = new List<PrivateLinkResource>();
 4829                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 1231                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 1237                            array.Add(PrivateLinkResource.DeserializePrivateLinkResource(item));
 38                        }
 39                    }
 1240                    value = array;
 1241                    continue;
 42                }
 1243                if (property.NameEquals("nextLink"))
 44                {
 1245                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    nextLink = property.Value.GetString();
 50                    continue;
 51                }
 52            }
 1253            return new PrivateLinkResourceListResult(value, nextLink);
 54        }
 55    }
 56}