< Summary

Class:Azure.ResourceManager.Resources.Models.ApplicationLockLevelExtensions
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ApplicationLockLevel.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%
ToApplicationLockLevel(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ApplicationLockLevel.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.Resources.Models
 11{
 12    internal static class ApplicationLockLevelExtensions
 13    {
 014        public static string ToSerialString(this ApplicationLockLevel value) => value switch
 015        {
 016            ApplicationLockLevel.CanNotDelete => "CanNotDelete",
 017            ApplicationLockLevel.ReadOnly => "ReadOnly",
 018            ApplicationLockLevel.None => "None",
 019            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ApplicationLockLevel value.")
 020        };
 21
 22        public static ApplicationLockLevel ToApplicationLockLevel(this string value)
 23        {
 024            if (string.Equals(value, "CanNotDelete", StringComparison.InvariantCultureIgnoreCase)) return ApplicationLoc
 025            if (string.Equals(value, "ReadOnly", StringComparison.InvariantCultureIgnoreCase)) return ApplicationLockLev
 026            if (string.Equals(value, "None", StringComparison.InvariantCultureIgnoreCase)) return ApplicationLockLevel.N
 027            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ApplicationLockLevel value.");
 28        }
 29    }
 30}