< Summary

Class:Azure.ResourceManager.Network.Models.ResourceSet
Assembly:Azure.ResourceManager.Network
File(s):C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ResourceSet.cs
C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ResourceSet.Serialization.cs
Covered lines:0
Uncovered lines:26
Coverable lines:26
Total lines:92
Line coverage:0% (0 of 26)
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_Subscriptions()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeResourceSet(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ResourceSet.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> The base resource set for visibility and auto-approval. </summary>
 13    public partial class ResourceSet
 14    {
 15        /// <summary> Initializes a new instance of ResourceSet. </summary>
 016        public ResourceSet()
 17        {
 018        }
 19
 20        /// <summary> Initializes a new instance of ResourceSet. </summary>
 21        /// <param name="subscriptions"> The list of subscriptions. </param>
 022        internal ResourceSet(IList<string> subscriptions)
 23        {
 024            Subscriptions = subscriptions;
 025        }
 26
 27        /// <summary> The list of subscriptions. </summary>
 028        public IList<string> Subscriptions { get; set; }
 29    }
 30}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\ResourceSet.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 ResourceSet : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Subscriptions != null)
 20            {
 021                writer.WritePropertyName("subscriptions");
 022                writer.WriteStartArray();
 023                foreach (var item in Subscriptions)
 24                {
 025                    writer.WriteStringValue(item);
 26                }
 027                writer.WriteEndArray();
 28            }
 029            writer.WriteEndObject();
 030        }
 31
 32        internal static ResourceSet DeserializeResourceSet(JsonElement element)
 33        {
 034            IList<string> subscriptions = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("subscriptions"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    List<string> array = new List<string>();
 044                    foreach (var item in property.Value.EnumerateArray())
 45                    {
 046                        if (item.ValueKind == JsonValueKind.Null)
 47                        {
 048                            array.Add(null);
 49                        }
 50                        else
 51                        {
 052                            array.Add(item.GetString());
 53                        }
 54                    }
 055                    subscriptions = array;
 56                    continue;
 57                }
 58            }
 059            return new ResourceSet(subscriptions);
 60        }
 61    }
 62}