< Summary

Class:Azure.ResourceManager.Compute.Models.RollingUpgradeActionTypeExtensions
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\RollingUpgradeActionType.Serialization.cs
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:28
Line coverage:0% (0 of 9)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\RollingUpgradeActionType.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 RollingUpgradeActionTypeExtensions
 13    {
 014        public static string ToSerialString(this RollingUpgradeActionType value) => value switch
 015        {
 016            RollingUpgradeActionType.Start => "Start",
 017            RollingUpgradeActionType.Cancel => "Cancel",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RollingUpgradeActionType value.")
 019        };
 20
 21        public static RollingUpgradeActionType ToRollingUpgradeActionType(this string value)
 22        {
 023            if (string.Equals(value, "Start", StringComparison.InvariantCultureIgnoreCase)) return RollingUpgradeActionT
 024            if (string.Equals(value, "Cancel", StringComparison.InvariantCultureIgnoreCase)) return RollingUpgradeAction
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown RollingUpgradeActionType value.");
 26        }
 27    }
 28}