< Summary

Class:Azure.ResourceManager.Resources.Models.FeatureOperationsListResult
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureOperationsListResult.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureOperationsListResult.Serialization.cs
Covered lines:18
Uncovered lines:6
Coverable lines:24
Total lines:90
Line coverage:75% (18 of 24)
Covered branches:10
Total branches:14
Branch coverage:71.4% (10 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Value()-100%100%
get_NextLink()-100%100%
DeserializeFeatureOperationsListResult(...)-75%71.43%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureOperationsListResult.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.Resources.Models
 11{
 12    /// <summary> List of previewed features. </summary>
 13    public partial class FeatureOperationsListResult
 14    {
 15        /// <summary> Initializes a new instance of FeatureOperationsListResult. </summary>
 016        internal FeatureOperationsListResult()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of FeatureOperationsListResult. </summary>
 21        /// <param name="value"> The array of features. </param>
 22        /// <param name="nextLink"> The URL to use for getting the next set of results. </param>
 823        internal FeatureOperationsListResult(IReadOnlyList<FeatureResult> value, string nextLink)
 24        {
 825            Value = value;
 826            NextLink = nextLink;
 827        }
 28
 29        /// <summary> The array of features. </summary>
 830        public IReadOnlyList<FeatureResult> Value { get; }
 31        /// <summary> The URL to use for getting the next set of results. </summary>
 832        public string NextLink { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\FeatureOperationsListResult.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.Resources.Models
 13{
 14    public partial class FeatureOperationsListResult
 15    {
 16        internal static FeatureOperationsListResult DeserializeFeatureOperationsListResult(JsonElement element)
 17        {
 818            IReadOnlyList<FeatureResult> value = default;
 819            string nextLink = default;
 3220            foreach (var property in element.EnumerateObject())
 21            {
 822                if (property.NameEquals("value"))
 23                {
 824                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 828                    List<FeatureResult> array = new List<FeatureResult>();
 3229                    foreach (var item in property.Value.EnumerateArray())
 30                    {
 831                        if (item.ValueKind == JsonValueKind.Null)
 32                        {
 033                            array.Add(null);
 34                        }
 35                        else
 36                        {
 837                            array.Add(FeatureResult.DeserializeFeatureResult(item));
 38                        }
 39                    }
 840                    value = array;
 841                    continue;
 42                }
 043                if (property.NameEquals("nextLink"))
 44                {
 045                    if (property.Value.ValueKind == JsonValueKind.Null)
 46                    {
 47                        continue;
 48                    }
 049                    nextLink = property.Value.GetString();
 50                    continue;
 51                }
 52            }
 853            return new FeatureOperationsListResult(value, nextLink);
 54        }
 55    }
 56}