< Summary

Class:Azure.ResourceManager.Resources.Models.TagCount
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TagCount.cs
C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TagCount.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_Type()-0%100%
get_Value()-0%100%
DeserializeTagCount(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TagCount.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.Resources.Models
 9{
 10    /// <summary> Tag count. </summary>
 11    public partial class TagCount
 12    {
 13        /// <summary> Initializes a new instance of TagCount. </summary>
 014        internal TagCount()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of TagCount. </summary>
 19        /// <param name="type"> Type of count. </param>
 20        /// <param name="value"> Value of count. </param>
 44821        internal TagCount(string type, int? value)
 22        {
 44823            Type = type;
 44824            Value = value;
 44825        }
 26
 27        /// <summary> Type of count. </summary>
 028        public string Type { get; }
 29        /// <summary> Value of count. </summary>
 030        public int? Value { get; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\TagCount.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.Resources.Models
 12{
 13    public partial class TagCount
 14    {
 15        internal static TagCount DeserializeTagCount(JsonElement element)
 16        {
 44817            string type = default;
 44818            int? value = default;
 268819            foreach (var property in element.EnumerateObject())
 20            {
 89621                if (property.NameEquals("type"))
 22                {
 44823                    if (property.Value.ValueKind == JsonValueKind.Null)
 24                    {
 25                        continue;
 26                    }
 44827                    type = property.Value.GetString();
 44828                    continue;
 29                }
 44830                if (property.NameEquals("value"))
 31                {
 44832                    if (property.Value.ValueKind == JsonValueKind.Null)
 33                    {
 34                        continue;
 35                    }
 44836                    value = property.Value.GetInt32();
 37                    continue;
 38                }
 39            }
 44840            return new TagCount(type, value);
 41        }
 42    }
 43}