< Summary

Class:Azure.ResourceManager.Compute.Models.DiskEncryptionSetList
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskEncryptionSetList.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskEncryptionSetList.Serialization.cs
Covered lines:17
Uncovered lines:9
Coverable lines:26
Total lines:95
Line coverage:65.3% (17 of 26)
Covered branches:9
Total branches:16
Branch coverage:56.2% (9 of 16)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-100%50%
get_Value()-100%100%
get_NextLink()-100%100%
DeserializeDiskEncryptionSetList(...)-73.33%66.67%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskEncryptionSetList.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.Collections.Generic;
 10using System.Linq;
 11
 12namespace Azure.ResourceManager.Compute.Models
 13{
 14    /// <summary> The List disk encryption set operation response. </summary>
 15    public partial class DiskEncryptionSetList
 16    {
 17        /// <summary> Initializes a new instance of DiskEncryptionSetList. </summary>
 18        /// <param name="value"> A list of disk encryption sets. </param>
 019        internal DiskEncryptionSetList(IEnumerable<DiskEncryptionSet> value)
 20        {
 021            if (value == null)
 22            {
 023                throw new ArgumentNullException(nameof(value));
 24            }
 25
 026            Value = value.ToArray();
 027        }
 28
 29        /// <summary> Initializes a new instance of DiskEncryptionSetList. </summary>
 30        /// <param name="value"> A list of disk encryption sets. </param>
 31        /// <param name="nextLink"> The uri to fetch the next page of disk encryption sets. Call ListNext() with this to
 1232        internal DiskEncryptionSetList(IReadOnlyList<DiskEncryptionSet> value, string nextLink)
 33        {
 1234            Value = value ?? new List<DiskEncryptionSet>();
 1235            NextLink = nextLink;
 1236        }
 37
 38        /// <summary> A list of disk encryption sets. </summary>
 1239        public IReadOnlyList<DiskEncryptionSet> Value { get; }
 40        /// <summary> The uri to fetch the next page of disk encryption sets. Call ListNext() with this to fetch the nex
 1241        public string NextLink { get; }
 42    }
 43}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\DiskEncryptionSetList.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.Compute.Models
 13{
 14    public partial class DiskEncryptionSetList
 15    {
 16        internal static DiskEncryptionSetList DeserializeDiskEncryptionSetList(JsonElement element)
 17        {
 1218            IReadOnlyList<DiskEncryptionSet> value = default;
 1219            string nextLink = default;
 4820            foreach (var property in element.EnumerateObject())
 21            {
 1222                if (property.NameEquals("value"))
 23                {
 1224                    List<DiskEncryptionSet> array = new List<DiskEncryptionSet>();
 8825                    foreach (var item in property.Value.EnumerateArray())
 26                    {
 3227                        if (item.ValueKind == JsonValueKind.Null)
 28                        {
 029                            array.Add(null);
 30                        }
 31                        else
 32                        {
 3233                            array.Add(DiskEncryptionSet.DeserializeDiskEncryptionSet(item));
 34                        }
 35                    }
 1236                    value = array;
 1237                    continue;
 38                }
 039                if (property.NameEquals("nextLink"))
 40                {
 041                    if (property.Value.ValueKind == JsonValueKind.Null)
 42                    {
 43                        continue;
 44                    }
 045                    nextLink = property.Value.GetString();
 46                    continue;
 47                }
 48            }
 1249            return new DiskEncryptionSetList(value, nextLink);
 50        }
 51    }
 52}