< Summary

Class:Azure.ResourceManager.Compute.Models.MaintenanceOperationResultCodeTypesExtensions
Assembly:Azure.ResourceManager.Compute
File(s):C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\MaintenanceOperationResultCodeTypes.Serialization.cs
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:32
Line coverage:0% (0 of 13)
Covered branches:0
Total branches:13
Branch coverage:0% (0 of 13)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-0%0%
ToMaintenanceOperationResultCodeTypes(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\compute\Azure.ResourceManager.Compute\src\Generated\Models\MaintenanceOperationResultCodeTypes.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.Compute.Models
 11{
 12    internal static class MaintenanceOperationResultCodeTypesExtensions
 13    {
 014        public static string ToSerialString(this MaintenanceOperationResultCodeTypes value) => value switch
 015        {
 016            MaintenanceOperationResultCodeTypes.None => "None",
 017            MaintenanceOperationResultCodeTypes.RetryLater => "RetryLater",
 018            MaintenanceOperationResultCodeTypes.MaintenanceAborted => "MaintenanceAborted",
 019            MaintenanceOperationResultCodeTypes.MaintenanceCompleted => "MaintenanceCompleted",
 020            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MaintenanceOperationResultCodeType
 021        };
 22
 23        public static MaintenanceOperationResultCodeTypes ToMaintenanceOperationResultCodeTypes(this string value)
 24        {
 025            if (string.Equals(value, "None", StringComparison.InvariantCultureIgnoreCase)) return MaintenanceOperationRe
 026            if (string.Equals(value, "RetryLater", StringComparison.InvariantCultureIgnoreCase)) return MaintenanceOpera
 027            if (string.Equals(value, "MaintenanceAborted", StringComparison.InvariantCultureIgnoreCase)) return Maintena
 028            if (string.Equals(value, "MaintenanceCompleted", StringComparison.InvariantCultureIgnoreCase)) return Mainte
 029            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown MaintenanceOperationResultCodeTypes val
 30        }
 31    }
 32}