< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.Face.Models.NoiseLevelEnumExtension
Assembly:Microsoft.Azure.CognitiveServices.Vision.Face
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.Face\src\Generated\Models\NoiseLevel.cs
Covered lines:0
Uncovered lines:9
Coverable lines:9
Total lines:66
Line coverage:0% (0 of 9)
Covered branches:0
Total branches:12
Branch coverage:0% (0 of 12)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.Face\src\Generated\Models\NoiseLevel.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.CognitiveServices.Vision.Face.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 NoiseLevel.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum NoiseLevel
 23    {
 24        [EnumMember(Value = "Low")]
 25        Low,
 26        [EnumMember(Value = "Medium")]
 27        Medium,
 28        [EnumMember(Value = "High")]
 29        High
 30    }
 31    internal static class NoiseLevelEnumExtension
 32    {
 33        internal static string ToSerializedValue(this NoiseLevel? value)
 34        {
 035            return value == null ? null : ((NoiseLevel)value).ToSerializedValue();
 36        }
 37
 38        internal static string ToSerializedValue(this NoiseLevel value)
 39        {
 40            switch( value )
 41            {
 42                case NoiseLevel.Low:
 043                    return "Low";
 44                case NoiseLevel.Medium:
 045                    return "Medium";
 46                case NoiseLevel.High:
 047                    return "High";
 48            }
 049            return null;
 50        }
 51
 52        internal static NoiseLevel? ParseNoiseLevel(this string value)
 53        {
 54            switch( value )
 55            {
 56                case "Low":
 057                    return NoiseLevel.Low;
 58                case "Medium":
 059                    return NoiseLevel.Medium;
 60                case "High":
 061                    return NoiseLevel.High;
 62            }
 063            return null;
 64        }
 65    }
 66}