< Summary

Class:Azure.ResourceManager.Network.Models.AvailableProvidersListCity
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AvailableProvidersListCity.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AvailableProvidersListCity.Serialization.cs
Covered lines:0
Uncovered lines:24
Coverable lines:24
Total lines:90
Line coverage:0% (0 of 24)
Covered branches:0
Total branches:14
Branch coverage:0% (0 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_CityName()-0%100%
get_Providers()-0%100%
DeserializeAvailableProvidersListCity(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AvailableProvidersListCity.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.Network.Models
 11{
 12    /// <summary> City or town details. </summary>
 13    public partial class AvailableProvidersListCity
 14    {
 15        /// <summary> Initializes a new instance of AvailableProvidersListCity. </summary>
 016        internal AvailableProvidersListCity()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of AvailableProvidersListCity. </summary>
 21        /// <param name="cityName"> The city or town name. </param>
 22        /// <param name="providers"> A list of Internet service providers. </param>
 023        internal AvailableProvidersListCity(string cityName, IReadOnlyList<string> providers)
 24        {
 025            CityName = cityName;
 026            Providers = providers;
 027        }
 28
 29        /// <summary> The city or town name. </summary>
 030        public string CityName { get; }
 31        /// <summary> A list of Internet service providers. </summary>
 032        public IReadOnlyList<string> Providers { get; }
 33    }
 34}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AvailableProvidersListCity.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.Network.Models
 13{
 14    public partial class AvailableProvidersListCity
 15    {
 16        internal static AvailableProvidersListCity DeserializeAvailableProvidersListCity(JsonElement element)
 17        {
 018            string cityName = default;
 019            IReadOnlyList<string> providers = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("cityName"))
 23                {
 024                    if (property.Value.ValueKind == JsonValueKind.Null)
 25                    {
 26                        continue;
 27                    }
 028                    cityName = property.Value.GetString();
 029                    continue;
 30                }
 031                if (property.NameEquals("providers"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    List<string> array = new List<string>();
 038                    foreach (var item in property.Value.EnumerateArray())
 39                    {
 040                        if (item.ValueKind == JsonValueKind.Null)
 41                        {
 042                            array.Add(null);
 43                        }
 44                        else
 45                        {
 046                            array.Add(item.GetString());
 47                        }
 48                    }
 049                    providers = array;
 50                    continue;
 51                }
 52            }
 053            return new AvailableProvidersListCity(cityName, providers);
 54        }
 55    }
 56}