< Summary

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

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\LoginMode.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 LoginMode.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum LoginMode
 23    {
 24        /// <summary>
 25        /// The LOGON32_LOGON_BATCH Win32 login mode. The batch login mode is
 26        /// recommended for long running parallel processes.
 27        /// </summary>
 28        [EnumMember(Value = "batch")]
 29        Batch,
 30        /// <summary>
 31        /// The LOGON32_LOGON_INTERACTIVE Win32 login mode. UAC is enabled on
 32        /// Windows VirtualMachineConfiguration Pools. If this option is used
 33        /// with an elevated user identity in a Windows
 34        /// VirtualMachineConfiguration Pool, the user session will not be
 35        /// elevated unless the application executed by the Task command line
 36        /// is configured to always require administrative privilege or to
 37        /// always require maximum privilege.
 38        /// </summary>
 39        [EnumMember(Value = "interactive")]
 40        Interactive
 41    }
 42    internal static class LoginModeEnumExtension
 43    {
 44        internal static string ToSerializedValue(this LoginMode? value)
 45        {
 046            return value == null ? null : ((LoginMode)value).ToSerializedValue();
 47        }
 48
 49        internal static string ToSerializedValue(this LoginMode value)
 50        {
 51            switch( value )
 52            {
 53                case LoginMode.Batch:
 054                    return "batch";
 55                case LoginMode.Interactive:
 056                    return "interactive";
 57            }
 058            return null;
 59        }
 60
 61        internal static LoginMode? ParseLoginMode(this string value)
 62        {
 63            switch( value )
 64            {
 65                case "batch":
 066                    return LoginMode.Batch;
 67                case "interactive":
 068                    return LoginMode.Interactive;
 69            }
 070            return null;
 71        }
 72    }
 73}