< Summary

Class:Azure.ResourceManager.Resources.Models.AliasPatternTypeExtensions
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\AliasPatternType.Serialization.cs
Covered lines:1
Uncovered lines:8
Coverable lines:9
Total lines:28
Line coverage:11.1% (1 of 9)
Covered branches:2
Total branches:8
Branch coverage:25% (2 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-0%0%
ToAliasPatternType(...)-33.33%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\AliasPatternType.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 AliasPatternTypeExtensions
 13    {
 014        public static string ToSerialString(this AliasPatternType value) => value switch
 015        {
 016            AliasPatternType.NotSpecified => "NotSpecified",
 017            AliasPatternType.Extract => "Extract",
 018            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AliasPatternType value.")
 019        };
 20
 21        public static AliasPatternType ToAliasPatternType(this string value)
 22        {
 023            if (string.Equals(value, "NotSpecified", StringComparison.InvariantCultureIgnoreCase)) return AliasPatternTy
 12824            if (string.Equals(value, "Extract", StringComparison.InvariantCultureIgnoreCase)) return AliasPatternType.Ex
 025            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown AliasPatternType value.");
 26        }
 27    }
 28}