< Summary

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

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\AliasType.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 AliasTypeExtensions
 13    {
 014        public static string ToSerialString(this AliasType value) => value switch
 015        {
 016            AliasType.NotSpecified => "NotSpecified",
 017            AliasType.PlainText => "PlainText",
 018            AliasType.Mask => "Mask",
 019            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AliasType value.")
 020        };
 21
 22        public static AliasType ToAliasType(this string value)
 23        {
 024            if (string.Equals(value, "NotSpecified", StringComparison.InvariantCultureIgnoreCase)) return AliasType.NotS
 025            if (string.Equals(value, "PlainText", StringComparison.InvariantCultureIgnoreCase)) return AliasType.PlainTe
 026            if (string.Equals(value, "Mask", StringComparison.InvariantCultureIgnoreCase)) return AliasType.Mask;
 027            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AliasType value.");
 28        }
 29    }
 30}