< Summary

Class:Microsoft.Azure.Batch.Protocol.Models.AccessScopeEnumExtension
Assembly:Microsoft.Azure.Batch
File(s):C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\AccessScope.cs
Covered lines:0
Uncovered lines:5
Coverable lines:5
Total lines:58
Line coverage:0% (0 of 5)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\batch\Microsoft.Azure.Batch\src\GeneratedProtocol\Models\AccessScope.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 AccessScope.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum AccessScope
 23    {
 24        /// <summary>
 25        /// Grants access to perform all operations on the Job containing the
 26        /// Task.
 27        /// </summary>
 28        [EnumMember(Value = "job")]
 29        Job
 30    }
 31    internal static class AccessScopeEnumExtension
 32    {
 33        internal static string ToSerializedValue(this AccessScope? value)
 34        {
 035            return value == null ? null : ((AccessScope)value).ToSerializedValue();
 36        }
 37
 38        internal static string ToSerializedValue(this AccessScope value)
 39        {
 40            switch( value )
 41            {
 42                case AccessScope.Job:
 043                    return "job";
 44            }
 045            return null;
 46        }
 47
 48        internal static AccessScope? ParseAccessScope(this string value)
 49        {
 50            switch( value )
 51            {
 52                case "job":
 053                    return AccessScope.Job;
 54            }
 055            return null;
 56        }
 57    }
 58}