< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
get_Countries()-0%100%
DeserializeAvailableProvidersList(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AvailableProvidersList.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.Network.Models
 13{
 14    /// <summary> List of available countries with details. </summary>
 15    public partial class AvailableProvidersList
 16    {
 17        /// <summary> Initializes a new instance of AvailableProvidersList. </summary>
 18        /// <param name="countries"> List of available countries. </param>
 019        internal AvailableProvidersList(IEnumerable<AvailableProvidersListCountry> countries)
 20        {
 021            if (countries == null)
 22            {
 023                throw new ArgumentNullException(nameof(countries));
 24            }
 25
 026            Countries = countries.ToArray();
 027        }
 28
 29        /// <summary> Initializes a new instance of AvailableProvidersList. </summary>
 30        /// <param name="countries"> List of available countries. </param>
 031        internal AvailableProvidersList(IReadOnlyList<AvailableProvidersListCountry> countries)
 32        {
 033            Countries = countries ?? new List<AvailableProvidersListCountry>();
 034        }
 35
 36        /// <summary> List of available countries. </summary>
 037        public IReadOnlyList<AvailableProvidersListCountry> Countries { get; }
 38    }
 39}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\AvailableProvidersList.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 AvailableProvidersList
 15    {
 16        internal static AvailableProvidersList DeserializeAvailableProvidersList(JsonElement element)
 17        {
 018            IReadOnlyList<AvailableProvidersListCountry> countries = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("countries"))
 22                {
 023                    List<AvailableProvidersListCountry> array = new List<AvailableProvidersListCountry>();
 024                    foreach (var item in property.Value.EnumerateArray())
 25                    {
 026                        if (item.ValueKind == JsonValueKind.Null)
 27                        {
 028                            array.Add(null);
 29                        }
 30                        else
 31                        {
 032                            array.Add(AvailableProvidersListCountry.DeserializeAvailableProvidersListCountry(item));
 33                        }
 34                    }
 035                    countries = array;
 36                    continue;
 37                }
 38            }
 039            return new AvailableProvidersList(countries);
 40        }
 41    }
 42}