< Summary

Class:Azure.ResourceManager.Compute.Models.VirtualMachineScaleSetVMNetworkProfileConfiguration
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMNetworkProfileConfiguration.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMNetworkProfileConfiguration.Serialization.cs
Covered lines:13
Uncovered lines:13
Coverable lines:26
Total lines:92
Line coverage:50% (13 of 26)
Covered branches:9
Total branches:14
Branch coverage:64.2% (9 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_NetworkInterfaceConfigurations()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeVirtualMachineScaleSetVMNetworkProfileConfiguration(...)-90.91%90%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMNetworkProfileConfiguration.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> Describes a virtual machine scale set VM network profile. </summary>
 13    public partial class VirtualMachineScaleSetVMNetworkProfileConfiguration
 14    {
 15        /// <summary> Initializes a new instance of VirtualMachineScaleSetVMNetworkProfileConfiguration. </summary>
 016        public VirtualMachineScaleSetVMNetworkProfileConfiguration()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of VirtualMachineScaleSetVMNetworkProfileConfiguration. </summary>
 21        /// <param name="networkInterfaceConfigurations"> The list of network configurations. </param>
 8822        internal VirtualMachineScaleSetVMNetworkProfileConfiguration(IList<VirtualMachineScaleSetNetworkConfiguration> n
 23        {
 8824            NetworkInterfaceConfigurations = networkInterfaceConfigurations;
 8825        }
 26
 27        /// <summary> The list of network configurations. </summary>
 028        public IList<VirtualMachineScaleSetNetworkConfiguration> NetworkInterfaceConfigurations { get; set; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\VirtualMachineScaleSetVMNetworkProfileConfiguration.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 VirtualMachineScaleSetVMNetworkProfileConfiguration : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (NetworkInterfaceConfigurations != null)
 20            {
 021                writer.WritePropertyName("networkInterfaceConfigurations");
 022                writer.WriteStartArray();
 023                foreach (var item in NetworkInterfaceConfigurations)
 24                {
 025                    writer.WriteObjectValue(item);
 26                }
 027                writer.WriteEndArray();
 28            }
 029            writer.WriteEndObject();
 030        }
 31
 32        internal static VirtualMachineScaleSetVMNetworkProfileConfiguration DeserializeVirtualMachineScaleSetVMNetworkPr
 33        {
 8834            IList<VirtualMachineScaleSetNetworkConfiguration> networkInterfaceConfigurations = default;
 35235            foreach (var property in element.EnumerateObject())
 36            {
 8837                if (property.NameEquals("networkInterfaceConfigurations"))
 38                {
 8839                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 8843                    List<VirtualMachineScaleSetNetworkConfiguration> array = new List<VirtualMachineScaleSetNetworkConfi
 35244                    foreach (var item in property.Value.EnumerateArray())
 45                    {
 8846                        if (item.ValueKind == JsonValueKind.Null)
 47                        {
 048                            array.Add(null);
 49                        }
 50                        else
 51                        {
 8852                            array.Add(VirtualMachineScaleSetNetworkConfiguration.DeserializeVirtualMachineScaleSetNetwor
 53                        }
 54                    }
 8855                    networkInterfaceConfigurations = array;
 56                    continue;
 57                }
 58            }
 8859            return new VirtualMachineScaleSetVMNetworkProfileConfiguration(networkInterfaceConfigurations);
 60        }
 61    }
 62}