< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVMExtensionsSummary
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMExtensionsSummary.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMExtensionsSummary.Serialization.cs
Covered lines:19
Uncovered lines:5
Coverable lines:24
Total lines:90
Line coverage:79.1% (19 of 24)
Covered branches:13
Total branches:14
Branch coverage:92.8% (13 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Name()-0%100%
get_StatusesSummary()-0%100%
DeserializeVirtualMachineScaleSetVMExtensionsSummary(...)-93.75%92.86%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMExtensionsSummary.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.Compute.Models
 11{
 12    /// <summary> Extensions summary for virtual machines of a virtual machine scale set. </summary>
 13    public partial class VirtualMachineScaleSetVMExtensionsSummary
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineScaleSetVMExtensionsSummary. </summary>
 016        internal VirtualMachineScaleSetVMExtensionsSummary()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineScaleSetVMExtensionsSummary. </summary>
 21        /// <param name="name"> The extension name. </param>
 22        /// <param name="statusesSummary"> The extensions information. </param>
 6023        internal VirtualMachineScaleSetVMExtensionsSummary(string name, IReadOnlyList<VirtualMachineStatusCodeCount> sta
 24        {
 6025            Name = name;
 6026            StatusesSummary = statusesSummary;
 6027        }
 28
 29        /// <summary> The extension name. </summary>
 030        public string Name { get; }
 31        /// <summary> The extensions information. </summary>
 032        public IReadOnlyList<VirtualMachineStatusCodeCount> StatusesSummary { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMExtensionsSummary.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 VirtualMachineScaleSetVMExtensionsSummary
 15    {
 16        internal static VirtualMachineScaleSetVMExtensionsSummary DeserializeVirtualMachineScaleSetVMExtensionsSummary(J
 17        {
 6018            string name = default;
 6019            IReadOnlyList<VirtualMachineStatusCodeCount> statusesSummary = default;
 36020            foreach (var property in element.EnumerateObject())
 21            {
 12022                if (property.NameEquals("name"))
 23                {
 6024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 6028                    name = property.Value.GetString();
 6029                    continue;
 30                }
 6031                if (property.NameEquals("statusesSummary"))
 32                {
 6033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 6037                    List<VirtualMachineStatusCodeCount> array = new List<VirtualMachineStatusCodeCount>();
 28438                    foreach (var item in property.Value.EnumerateArray())
 39                    {
 8240                        if (item.ValueKind == JsonValueKind.Null)
 41                        {
 042                            array.Add(null);
 43                        }
 44                        else
 45                        {
 8246                            array.Add(VirtualMachineStatusCodeCount.DeserializeVirtualMachineStatusCodeCount(item));
 47                        }
 48                    }
 6049                    statusesSummary = array;
 50                    continue;
 51                }
 52            }
 6053            return new VirtualMachineScaleSetVMExtensionsSummary(name, statusesSummary);
 54        }
 55    }
 56}