< Summary

Class:Microsoft.Azure.Search.Models.SentimentSkillLanguageEnumExtension
Assembly:Microsoft.Azure.Search.Service
File(s):C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\SentimentSkillLanguage.cs
Covered lines:0
Uncovered lines:33
Coverable lines:33
Total lines:138
Line coverage:0% (0 of 33)
Covered branches:0
Total branches:90
Branch coverage:0% (0 of 90)

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Microsoft.Azure.Search.Service\src\Generated\Models\SentimentSkillLanguage.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 SentimentSkillLanguage.
 20    /// </summary>
 21    [JsonConverter(typeof(StringEnumConverter))]
 22    public enum SentimentSkillLanguage
 23    {
 24        [EnumMember(Value = "da")]
 25        Da,
 26        [EnumMember(Value = "nl")]
 27        Nl,
 28        [EnumMember(Value = "en")]
 29        En,
 30        [EnumMember(Value = "fi")]
 31        Fi,
 32        [EnumMember(Value = "fr")]
 33        Fr,
 34        [EnumMember(Value = "de")]
 35        De,
 36        [EnumMember(Value = "el")]
 37        El,
 38        [EnumMember(Value = "it")]
 39        It,
 40        [EnumMember(Value = "no")]
 41        No,
 42        [EnumMember(Value = "pl")]
 43        Pl,
 44        [EnumMember(Value = "pt-PT")]
 45        PtPT,
 46        [EnumMember(Value = "ru")]
 47        Ru,
 48        [EnumMember(Value = "es")]
 49        Es,
 50        [EnumMember(Value = "sv")]
 51        Sv,
 52        [EnumMember(Value = "tr")]
 53        Tr
 54    }
 55    internal static class SentimentSkillLanguageEnumExtension
 56    {
 57        internal static string ToSerializedValue(this SentimentSkillLanguage? value)
 58        {
 059            return value == null ? null : ((SentimentSkillLanguage)value).ToSerializedValue();
 60        }
 61
 62        internal static string ToSerializedValue(this SentimentSkillLanguage value)
 63        {
 64            switch( value )
 65            {
 66                case SentimentSkillLanguage.Da:
 067                    return "da";
 68                case SentimentSkillLanguage.Nl:
 069                    return "nl";
 70                case SentimentSkillLanguage.En:
 071                    return "en";
 72                case SentimentSkillLanguage.Fi:
 073                    return "fi";
 74                case SentimentSkillLanguage.Fr:
 075                    return "fr";
 76                case SentimentSkillLanguage.De:
 077                    return "de";
 78                case SentimentSkillLanguage.El:
 079                    return "el";
 80                case SentimentSkillLanguage.It:
 081                    return "it";
 82                case SentimentSkillLanguage.No:
 083                    return "no";
 84                case SentimentSkillLanguage.Pl:
 085                    return "pl";
 86                case SentimentSkillLanguage.PtPT:
 087                    return "pt-PT";
 88                case SentimentSkillLanguage.Ru:
 089                    return "ru";
 90                case SentimentSkillLanguage.Es:
 091                    return "es";
 92                case SentimentSkillLanguage.Sv:
 093                    return "sv";
 94                case SentimentSkillLanguage.Tr:
 095                    return "tr";
 96            }
 097            return null;
 98        }
 99
 100        internal static SentimentSkillLanguage? ParseSentimentSkillLanguage(this string value)
 101        {
 102            switch( value )
 103            {
 104                case "da":
 0105                    return SentimentSkillLanguage.Da;
 106                case "nl":
 0107                    return SentimentSkillLanguage.Nl;
 108                case "en":
 0109                    return SentimentSkillLanguage.En;
 110                case "fi":
 0111                    return SentimentSkillLanguage.Fi;
 112                case "fr":
 0113                    return SentimentSkillLanguage.Fr;
 114                case "de":
 0115                    return SentimentSkillLanguage.De;
 116                case "el":
 0117                    return SentimentSkillLanguage.El;
 118                case "it":
 0119                    return SentimentSkillLanguage.It;
 120                case "no":
 0121                    return SentimentSkillLanguage.No;
 122                case "pl":
 0123                    return SentimentSkillLanguage.Pl;
 124                case "pt-PT":
 0125                    return SentimentSkillLanguage.PtPT;
 126                case "ru":
 0127                    return SentimentSkillLanguage.Ru;
 128                case "es":
 0129                    return SentimentSkillLanguage.Es;
 130                case "sv":
 0131                    return SentimentSkillLanguage.Sv;
 132                case "tr":
 0133                    return SentimentSkillLanguage.Tr;
 134            }
 0135            return null;
 136        }
 137    }
 138}