< Summary

Class:Azure.ResourceManager.Compute.Models.UpgradeOperationInvokerExtensions
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\UpgradeOperationInvoker.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%
ToUpgradeOperationInvoker(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\UpgradeOperationInvoker.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 UpgradeOperationInvokerExtensions
 13    {
 014        public static string ToSerialString(this UpgradeOperationInvoker value) => value switch
 015        {
 016            UpgradeOperationInvoker.Unknown => "Unknown",
 017            UpgradeOperationInvoker.User => "User",
 018            UpgradeOperationInvoker.Platform => "Platform",
 019            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UpgradeOperationInvoker value.")
 020        };
 21
 22        public static UpgradeOperationInvoker ToUpgradeOperationInvoker(this string value)
 23        {
 024            if (string.Equals(value, "Unknown", StringComparison.InvariantCultureIgnoreCase)) return UpgradeOperationInv
 025            if (string.Equals(value, "User", StringComparison.InvariantCultureIgnoreCase)) return UpgradeOperationInvoke
 026            if (string.Equals(value, "Platform", StringComparison.InvariantCultureIgnoreCase)) return UpgradeOperationIn
 027            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown UpgradeOperationInvoker value.");
 28        }
 29    }
 30}