< Summary

Class:Azure.ResourceManager.Compute.Models.ResourceRange
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceRange.cs
C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceRange.Serialization.cs
Covered lines:0
Uncovered lines:28
Coverable lines:28
Total lines:91
Line coverage:0% (0 of 28)
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_Min()-0%100%
get_Max()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeResourceRange(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceRange.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.Compute.Models
 9{
 10    /// <summary> Describes the resource range. </summary>
 11    public partial class ResourceRange
 12    {
 13        /// <summary> Initializes a new instance of ResourceRange. </summary>
 014        public ResourceRange()
 15        {
 016        }
 17
 18        /// <summary> Initializes a new instance of ResourceRange. </summary>
 19        /// <param name="min"> The minimum number of the resource. </param>
 20        /// <param name="max"> The maximum number of the resource. </param>
 021        internal ResourceRange(int? min, int? max)
 22        {
 023            Min = min;
 024            Max = max;
 025        }
 26
 27        /// <summary> The minimum number of the resource. </summary>
 028        public int? Min { get; set; }
 29        /// <summary> The maximum number of the resource. </summary>
 030        public int? Max { get; set; }
 31    }
 32}

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceRange.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.Compute.Models
 12{
 13    public partial class ResourceRange : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            if (Min != null)
 19            {
 020                writer.WritePropertyName("min");
 021                writer.WriteNumberValue(Min.Value);
 22            }
 023            if (Max != null)
 24            {
 025                writer.WritePropertyName("max");
 026                writer.WriteNumberValue(Max.Value);
 27            }
 028            writer.WriteEndObject();
 029        }
 30
 31        internal static ResourceRange DeserializeResourceRange(JsonElement element)
 32        {
 033            int? min = default;
 034            int? max = default;
 035            foreach (var property in element.EnumerateObject())
 36            {
 037                if (property.NameEquals("min"))
 38                {
 039                    if (property.Value.ValueKind == JsonValueKind.Null)
 40                    {
 41                        continue;
 42                    }
 043                    min = property.Value.GetInt32();
 044                    continue;
 45                }
 046                if (property.NameEquals("max"))
 47                {
 048                    if (property.Value.ValueKind == JsonValueKind.Null)
 49                    {
 50                        continue;
 51                    }
 052                    max = property.Value.GetInt32();
 53                    continue;
 54                }
 55            }
 056            return new ResourceRange(min, max);
 57        }
 58    }
 59}