< Summary

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

File(s)

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