< Summary

Class:Microsoft.Azure.Batch.Protocol.Models.StorageAccountTypeEnumExtension
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\StorageAccountType.cs
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:66
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%
ParseStorageAccountType(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\StorageAccountType.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 StorageAccountType.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum StorageAccountType
 23    {
 24        /// <summary>
 25        /// The data disk should use standard locally redundant storage.
 26        /// </summary>
 27        [EnumMember(Value = "standard_lrs")]
 28        StandardLRS,
 29        /// <summary>
 30        /// The data disk should use premium locally redundant storage.
 31        /// </summary>
 32        [EnumMember(Value = "premium_lrs")]
 33        PremiumLRS
 34    }
 35    internal static class StorageAccountTypeEnumExtension
 36    {
 37        internal static string ToSerializedValue(this StorageAccountType? value)
 38        {
 039            return value == null ? null : ((StorageAccountType)value).ToSerializedValue();
 40        }
 41
 42        internal static string ToSerializedValue(this StorageAccountType value)
 43        {
 44            switch( value )
 45            {
 46                case StorageAccountType.StandardLRS:
 047                    return "standard_lrs";
 48                case StorageAccountType.PremiumLRS:
 049                    return "premium_lrs";
 50            }
 051            return null;
 52        }
 53
 54        internal static StorageAccountType? ParseStorageAccountType(this string value)
 55        {
 56            switch( value )
 57            {
 58                case "standard_lrs":
 059                    return StorageAccountType.StandardLRS;
 60                case "premium_lrs":
 061                    return StorageAccountType.PremiumLRS;
 62            }
 063            return null;
 64        }
 65    }
 66}