< Summary

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

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\CertificateStoreLocation.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 CertificateStoreLocation.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum CertificateStoreLocation
 23    {
 24        /// <summary>
 25        /// Certificates should be installed to the CurrentUser Certificate
 26        /// store.
 27        /// </summary>
 28        [EnumMember(Value = "currentuser")]
 29        CurrentUser,
 30        /// <summary>
 31        /// Certificates should be installed to the LocalMachine Certificate
 32        /// store.
 33        /// </summary>
 34        [EnumMember(Value = "localmachine")]
 35        LocalMachine
 36    }
 37    internal static class CertificateStoreLocationEnumExtension
 38    {
 39        internal static string ToSerializedValue(this CertificateStoreLocation? value)
 40        {
 041            return value == null ? null : ((CertificateStoreLocation)value).ToSerializedValue();
 42        }
 43
 44        internal static string ToSerializedValue(this CertificateStoreLocation value)
 45        {
 46            switch( value )
 47            {
 48                case CertificateStoreLocation.CurrentUser:
 049                    return "currentuser";
 50                case CertificateStoreLocation.LocalMachine:
 051                    return "localmachine";
 52            }
 053            return null;
 54        }
 55
 56        internal static CertificateStoreLocation? ParseCertificateStoreLocation(this string value)
 57        {
 58            switch( value )
 59            {
 60                case "currentuser":
 061                    return CertificateStoreLocation.CurrentUser;
 62                case "localmachine":
 063                    return CertificateStoreLocation.LocalMachine;
 64            }
 065            return null;
 66        }
 67    }
 68}