< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models.DescriptionExcludeEnumExtension
Assembly:Microsoft.Azure.CognitiveServices.Vision.ComputerVision
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.ComputerVision\src\Generated\Models\DescriptionExclude.cs
Covered lines:0
Uncovered lines:7
Coverable lines:7
Total lines:60
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%
ParseDescriptionExclude(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.ComputerVision\src\Generated\Models\DescriptionExclude.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.ComputerVision.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 DescriptionExclude.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum DescriptionExclude
 23    {
 24        [EnumMember(Value = "Celebrities")]
 25        Celebrities,
 26        [EnumMember(Value = "Landmarks")]
 27        Landmarks
 28    }
 29    internal static class DescriptionExcludeEnumExtension
 30    {
 31        internal static string ToSerializedValue(this DescriptionExclude? value)
 32        {
 033            return value == null ? null : ((DescriptionExclude)value).ToSerializedValue();
 34        }
 35
 36        internal static string ToSerializedValue(this DescriptionExclude value)
 37        {
 38            switch( value )
 39            {
 40                case DescriptionExclude.Celebrities:
 041                    return "Celebrities";
 42                case DescriptionExclude.Landmarks:
 043                    return "Landmarks";
 44            }
 045            return null;
 46        }
 47
 48        internal static DescriptionExclude? ParseDescriptionExclude(this string value)
 49        {
 50            switch( value )
 51            {
 52                case "Celebrities":
 053                    return DescriptionExclude.Celebrities;
 54                case "Landmarks":
 055                    return DescriptionExclude.Landmarks;
 56            }
 057            return null;
 58        }
 59    }
 60}