< Summary

Class:Azure.ResourceManager.Network.Models.VirtualNetworkUsageName
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualNetworkUsageName.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualNetworkUsageName.Serialization.cs
Covered lines:15
Uncovered lines:4
Coverable lines:19
Total lines:75
Line coverage:78.9% (15 of 19)
Covered branches:10
Total branches:10
Branch coverage:100% (10 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_LocalizedValue()-0%100%
get_Value()-0%100%
DeserializeVirtualNetworkUsageName(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualNetworkUsageName.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
 8namespace Azure.ResourceManager.Network.Models
 9{
 10    /// <summary> Usage strings container. </summary>
 11    public partial class VirtualNetworkUsageName
 12    {
 13        /// <summary> Initializes a new instance of VirtualNetworkUsageName. </summary>
 014        internal VirtualNetworkUsageName()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of VirtualNetworkUsageName. </summary>
 19        /// <param name="localizedValue"> Localized subnet size and usage string. </param>
 20        /// <param name="value"> Subnet size and usage string. </param>
 821        internal VirtualNetworkUsageName(string localizedValue, string value)
 22        {
 823            LocalizedValue = localizedValue;
 824            Value = value;
 825        }
 26
 27        /// <summary> Localized subnet size and usage string. </summary>
 028        public string LocalizedValue { get; }
 29        /// <summary> Subnet size and usage string. </summary>
 030        public string Value { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\VirtualNetworkUsageName.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.ResourceManager.Network.Models
 12{
 13    public partial class VirtualNetworkUsageName
 14    {
 15        internal static VirtualNetworkUsageName DeserializeVirtualNetworkUsageName(JsonElement element)
 16        {
 817            string localizedValue = default;
 818            string value = default;
 4819            foreach (var property in element.EnumerateObject())
 20            {
 1621                if (property.NameEquals("localizedValue"))
 22                {
 823                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 827                    localizedValue = property.Value.GetString();
 828                    continue;
 29                }
 830                if (property.NameEquals("value"))
 31                {
 832                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 836                    value = property.Value.GetString();
 37                    continue;
 38                }
 39            }
 840            return new VirtualNetworkUsageName(localizedValue, value);
 41        }
 42    }
 43}