< Summary

Class:Azure.ResourceManager.Compute.Models.ResourceSkuCapacityScaleTypeExtensions
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuCapacityScaleType.Serialization.cs
Covered lines:0
Uncovered lines:11
Coverable lines:11
Total lines:30
Line coverage:0% (0 of 11)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-0%0%
ToResourceSkuCapacityScaleType(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\ResourceSkuCapacityScaleType.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;
 9
 10namespace Azure.ResourceManager.Compute.Models
 11{
 12    internal static class ResourceSkuCapacityScaleTypeExtensions
 13    {
 014        public static string ToSerialString(this ResourceSkuCapacityScaleType value) => value switch
 015        {
 016            ResourceSkuCapacityScaleType.Automatic => "Automatic",
 017            ResourceSkuCapacityScaleType.Manual => "Manual",
 018            ResourceSkuCapacityScaleType.None => "None",
 019            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResourceSkuCapacityScaleType value
 020        };
 21
 22        public static ResourceSkuCapacityScaleType ToResourceSkuCapacityScaleType(this string value)
 23        {
 024            if (string.Equals(value, "Automatic", StringComparison.InvariantCultureIgnoreCase)) return ResourceSkuCapaci
 025            if (string.Equals(value, "Manual", StringComparison.InvariantCultureIgnoreCase)) return ResourceSkuCapacityS
 026            if (string.Equals(value, "None", StringComparison.InvariantCultureIgnoreCase)) return ResourceSkuCapacitySca
 027            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ResourceSkuCapacityScaleType value.");
 28        }
 29    }
 30}