< Summary

Class:Azure.ResourceManager.KeyVault.Models.AccessPolicyUpdateKindExtensions
Assembly:Azure.ResourceManager.KeyVault
File(s):C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\AccessPolicyUpdateKind.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%
ToAccessPolicyUpdateKind(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\keyvault\Azure.ResourceManager.KeyVault\src\Generated\Models\AccessPolicyUpdateKind.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.KeyVault.Models
 11{
 12    internal static class AccessPolicyUpdateKindExtensions
 13    {
 014        public static string ToSerialString(this AccessPolicyUpdateKind value) => value switch
 015        {
 016            AccessPolicyUpdateKind.Add => "add",
 017            AccessPolicyUpdateKind.Replace => "replace",
 018            AccessPolicyUpdateKind.Remove => "remove",
 019            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AccessPolicyUpdateKind value.")
 020        };
 21
 22        public static AccessPolicyUpdateKind ToAccessPolicyUpdateKind(this string value)
 23        {
 024            if (string.Equals(value, "add", StringComparison.InvariantCultureIgnoreCase)) return AccessPolicyUpdateKind.
 025            if (string.Equals(value, "replace", StringComparison.InvariantCultureIgnoreCase)) return AccessPolicyUpdateK
 026            if (string.Equals(value, "remove", StringComparison.InvariantCultureIgnoreCase)) return AccessPolicyUpdateKi
 027            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AccessPolicyUpdateKind value.");
 28        }
 29    }
 30}