< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeContainer(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Container.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> Reference to container resource in remote resource provider. </summary>
 11    public partial class Container : SubResource
 12    {
 13        /// <summary> Initializes a new instance of Container. </summary>
 014        public Container()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of Container. </summary>
 19        /// <param name="id"> Resource ID. </param>
 020        internal Container(string id) : base(id)
 21        {
 022        }
 23    }
 24}

C:\Git\azure-sdk-for-net\sdk\network\Azure.ResourceManager.Network\src\Generated\Models\Container.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 Container : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Id != null)
 19            {
 020                writer.WritePropertyName("id");
 021                writer.WriteStringValue(Id);
 22            }
 023            writer.WriteEndObject();
 024        }
 25
 26        internal static Container DeserializeContainer(JsonElement element)
 27        {
 028            string id = default;
 029            foreach (var property in element.EnumerateObject())
 30            {
 031                if (property.NameEquals("id"))
 32                {
 033                    if (property.Value.ValueKind == JsonValueKind.Null)
 34                    {
 35                        continue;
 36                    }
 037                    id = property.Value.GetString();
 38                    continue;
 39                }
 40            }
 041            return new Container(id);
 42        }
 43    }
 44}