< Summary

Class:Azure.Search.Documents.Indexes.Models.StopwordsListExtensions
Assembly:Azure.Search.Documents
File(s):C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\StopwordsList.Serialization.cs
Covered lines:0
Uncovered lines:67
Coverable lines:67
Total lines:86
Line coverage:0% (0 of 67)
Covered branches:0
Total branches:94
Branch coverage:0% (0 of 94)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
ToSerialString(...)-0%0%
ToStopwordsList(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\StopwordsList.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9
 10namespace Azure.Search.Documents.Indexes.Models
 11{
 12    internal static class StopwordsListExtensions
 13    {
 014        public static string ToSerialString(this StopwordsList value) => value switch
 015        {
 016            StopwordsList.Arabic => "arabic",
 017            StopwordsList.Armenian => "armenian",
 018            StopwordsList.Basque => "basque",
 019            StopwordsList.Brazilian => "brazilian",
 020            StopwordsList.Bulgarian => "bulgarian",
 021            StopwordsList.Catalan => "catalan",
 022            StopwordsList.Czech => "czech",
 023            StopwordsList.Danish => "danish",
 024            StopwordsList.Dutch => "dutch",
 025            StopwordsList.English => "english",
 026            StopwordsList.Finnish => "finnish",
 027            StopwordsList.French => "french",
 028            StopwordsList.Galician => "galician",
 029            StopwordsList.German => "german",
 030            StopwordsList.Greek => "greek",
 031            StopwordsList.Hindi => "hindi",
 032            StopwordsList.Hungarian => "hungarian",
 033            StopwordsList.Indonesian => "indonesian",
 034            StopwordsList.Irish => "irish",
 035            StopwordsList.Italian => "italian",
 036            StopwordsList.Latvian => "latvian",
 037            StopwordsList.Norwegian => "norwegian",
 038            StopwordsList.Persian => "persian",
 039            StopwordsList.Portuguese => "portuguese",
 040            StopwordsList.Romanian => "romanian",
 041            StopwordsList.Russian => "russian",
 042            StopwordsList.Sorani => "sorani",
 043            StopwordsList.Spanish => "spanish",
 044            StopwordsList.Swedish => "swedish",
 045            StopwordsList.Thai => "thai",
 046            StopwordsList.Turkish => "turkish",
 047            _ => throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown StopwordsList value.")
 048        };
 49
 50        public static StopwordsList ToStopwordsList(this string value)
 51        {
 052            if (string.Equals(value, "arabic", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Arabic
 053            if (string.Equals(value, "armenian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Arme
 054            if (string.Equals(value, "basque", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Basque
 055            if (string.Equals(value, "brazilian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Bra
 056            if (string.Equals(value, "bulgarian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Bul
 057            if (string.Equals(value, "catalan", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Catal
 058            if (string.Equals(value, "czech", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Czech;
 059            if (string.Equals(value, "danish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Danish
 060            if (string.Equals(value, "dutch", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Dutch;
 061            if (string.Equals(value, "english", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Engli
 062            if (string.Equals(value, "finnish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Finni
 063            if (string.Equals(value, "french", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.French
 064            if (string.Equals(value, "galician", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Gali
 065            if (string.Equals(value, "german", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.German
 066            if (string.Equals(value, "greek", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Greek;
 067            if (string.Equals(value, "hindi", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Hindi;
 068            if (string.Equals(value, "hungarian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Hun
 069            if (string.Equals(value, "indonesian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.In
 070            if (string.Equals(value, "irish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Irish;
 071            if (string.Equals(value, "italian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Itali
 072            if (string.Equals(value, "latvian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Latvi
 073            if (string.Equals(value, "norwegian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Nor
 074            if (string.Equals(value, "persian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Persi
 075            if (string.Equals(value, "portuguese", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Po
 076            if (string.Equals(value, "romanian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Roma
 077            if (string.Equals(value, "russian", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Russi
 078            if (string.Equals(value, "sorani", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Sorani
 079            if (string.Equals(value, "spanish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Spani
 080            if (string.Equals(value, "swedish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Swedi
 081            if (string.Equals(value, "thai", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Thai;
 082            if (string.Equals(value, "turkish", StringComparison.InvariantCultureIgnoreCase)) return StopwordsList.Turki
 083            throw new ArgumentOutOfRangeException(nameof(value), value, "Unknown StopwordsList value.");
 84        }
 85    }
 86}