< Summary

Class:Microsoft.Azure.Batch.Protocol.Models.VerificationTypeEnumExtension
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\VerificationType.cs
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:70
Line coverage:0% (0 of 7)
Covered branches:0
Total branches:10
Branch coverage:0% (0 of 10)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerializedValue(...)-0%0%
ToSerializedValue(...)-0%0%
ParseVerificationType(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\VerificationType.cs

#LineLine coverage
 1// <auto-generated>
 2// Copyright (c) Microsoft Corporation. All rights reserved.
 3// Licensed under the MIT License. See License.txt in the project root for
 4// license information.
 5//
 6// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.Batch.Protocol.Models
 12{
 13    using Newtonsoft.Json;
 14    using Newtonsoft.Json.Converters;
 15    using System.Runtime;
 16    using System.Runtime.Serialization;
 17
 18    /// <summary>
 19    /// Defines values for VerificationType.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum VerificationType
 23    {
 24        /// <summary>
 25        /// The Image is guaranteed to be compatible with the associated
 26        /// Compute Node agent SKU and all Batch features have been confirmed
 27        /// to work as expected.
 28        /// </summary>
 29        [EnumMember(Value = "verified")]
 30        Verified,
 31        /// <summary>
 32        /// The associated Compute Node agent SKU should have binary
 33        /// compatibility with the Image, but specific functionality has not
 34        /// been verified.
 35        /// </summary>
 36        [EnumMember(Value = "unverified")]
 37        Unverified
 38    }
 39    internal static class VerificationTypeEnumExtension
 40    {
 41        internal static string ToSerializedValue(this VerificationType? value)
 42        {
 043            return value == null ? null : ((VerificationType)value).ToSerializedValue();
 44        }
 45
 46        internal static string ToSerializedValue(this VerificationType value)
 47        {
 48            switch( value )
 49            {
 50                case VerificationType.Verified:
 051                    return "verified";
 52                case VerificationType.Unverified:
 053                    return "unverified";
 54            }
 055            return null;
 56        }
 57
 58        internal static VerificationType? ParseVerificationType(this string value)
 59        {
 60            switch( value )
 61            {
 62                case "verified":
 063                    return VerificationType.Verified;
 64                case "unverified":
 065                    return VerificationType.Unverified;
 66            }
 067            return null;
 68        }
 69    }
 70}