< Summary

Class:Azure.ResourceManager.Resources.Models.ProvisioningOperationExtensions
Assembly:Azure.ResourceManager.Resources
File(s):C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ProvisioningOperation.Serialization.cs
Covered lines:2
Uncovered lines:23
Coverable lines:25
Total lines:44
Line coverage:8% (2 of 25)
Covered branches:10
Total branches:31
Branch coverage:32.2% (10 of 31)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-0%0%
ToProvisioningOperation(...)-18.18%50%

File(s)

C:\Git\azure-sdk-for-net\sdk\resources\Azure.ResourceManager.Resources\src\Generated\Models\ProvisioningOperation.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 ProvisioningOperationExtensions
 13    {
 014        public static string ToSerialString(this ProvisioningOperation value) => value switch
 015        {
 016            ProvisioningOperation.NotSpecified => "NotSpecified",
 017            ProvisioningOperation.Create => "Create",
 018            ProvisioningOperation.Delete => "Delete",
 019            ProvisioningOperation.Waiting => "Waiting",
 020            ProvisioningOperation.AzureAsyncOperationWaiting => "AzureAsyncOperationWaiting",
 021            ProvisioningOperation.ResourceCacheWaiting => "ResourceCacheWaiting",
 022            ProvisioningOperation.Action => "Action",
 023            ProvisioningOperation.Read => "Read",
 024            ProvisioningOperation.EvaluateDeploymentOutput => "EvaluateDeploymentOutput",
 025            ProvisioningOperation.DeploymentCleanup => "DeploymentCleanup",
 026            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProvisioningOperation value.")
 027        };
 28
 29        public static ProvisioningOperation ToProvisioningOperation(this string value)
 30        {
 031            if (string.Equals(value, "NotSpecified", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOp
 7632            if (string.Equals(value, "Create", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOperatio
 033            if (string.Equals(value, "Delete", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOperatio
 034            if (string.Equals(value, "Waiting", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOperati
 035            if (string.Equals(value, "AzureAsyncOperationWaiting", StringComparison.InvariantCultureIgnoreCase)) return 
 036            if (string.Equals(value, "ResourceCacheWaiting", StringComparison.InvariantCultureIgnoreCase)) return Provis
 037            if (string.Equals(value, "Action", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOperatio
 038            if (string.Equals(value, "Read", StringComparison.InvariantCultureIgnoreCase)) return ProvisioningOperation.
 2439            if (string.Equals(value, "EvaluateDeploymentOutput", StringComparison.InvariantCultureIgnoreCase)) return Pr
 040            if (string.Equals(value, "DeploymentCleanup", StringComparison.InvariantCultureIgnoreCase)) return Provision
 041            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown ProvisioningOperation value.");
 42        }
 43    }
 44}