< Summary

Class:Microsoft.Azure.Search.Models.EntityRecognitionSkillLanguageEnumExtension
Assembly:Microsoft.Azure.Search.Service
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\EntityRecognitionSkillLanguage.cs
Covered lines:0
Uncovered lines:13
Coverable lines:13
Total lines:78
Line coverage:0% (0 of 13)
Covered branches:0
Total branches:18
Branch coverage:0% (0 of 18)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\EntityRecognitionSkillLanguage.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.Search.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 EntityRecognitionSkillLanguage.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum EntityRecognitionSkillLanguage
 23    {
 24        [EnumMember(Value = "de")]
 25        De,
 26        [EnumMember(Value = "en")]
 27        En,
 28        [EnumMember(Value = "es")]
 29        Es,
 30        [EnumMember(Value = "fr")]
 31        Fr,
 32        [EnumMember(Value = "it")]
 33        It
 34    }
 35    internal static class EntityRecognitionSkillLanguageEnumExtension
 36    {
 37        internal static string ToSerializedValue(this EntityRecognitionSkillLanguage? value)
 38        {
 039            return value == null ? null : ((EntityRecognitionSkillLanguage)value).ToSerializedValue();
 40        }
 41
 42        internal static string ToSerializedValue(this EntityRecognitionSkillLanguage value)
 43        {
 44            switch( value )
 45            {
 46                case EntityRecognitionSkillLanguage.De:
 047                    return "de";
 48                case EntityRecognitionSkillLanguage.En:
 049                    return "en";
 50                case EntityRecognitionSkillLanguage.Es:
 051                    return "es";
 52                case EntityRecognitionSkillLanguage.Fr:
 053                    return "fr";
 54                case EntityRecognitionSkillLanguage.It:
 055                    return "it";
 56            }
 057            return null;
 58        }
 59
 60        internal static EntityRecognitionSkillLanguage? ParseEntityRecognitionSkillLanguage(this string value)
 61        {
 62            switch( value )
 63            {
 64                case "de":
 065                    return EntityRecognitionSkillLanguage.De;
 66                case "en":
 067                    return EntityRecognitionSkillLanguage.En;
 68                case "es":
 069                    return EntityRecognitionSkillLanguage.Es;
 70                case "fr":
 071                    return EntityRecognitionSkillLanguage.Fr;
 72                case "it":
 073                    return EntityRecognitionSkillLanguage.It;
 74            }
 075            return null;
 76        }
 77    }
 78}