< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%0%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeElisionTokenFilter(...)-0%0%
get_Articles()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\ElisionTokenFilter.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;
 9using System.Collections.Generic;
 10using Azure.Core;
 11
 12namespace Azure.Search.Documents.Indexes.Models
 13{
 14    /// <summary> Removes elisions. For example, &quot;l&apos;avion&quot; (the plane) will be converted to &quot;avion&q
 15    public partial class ElisionTokenFilter : TokenFilter
 16    {
 17        /// <summary> Initializes a new instance of ElisionTokenFilter. </summary>
 18        /// <param name="name"> The name of the token filter. It must only contain letters, digits, spaces, dashes or un
 19        /// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception>
 020        public ElisionTokenFilter(string name) : base(name)
 21        {
 022            if (name == null)
 23            {
 024                throw new ArgumentNullException(nameof(name));
 25            }
 26
 027            Articles = new ChangeTrackingList<string>();
 028            ODataType = "#Microsoft.Azure.Search.ElisionTokenFilter";
 029        }
 30
 31        /// <summary> Initializes a new instance of ElisionTokenFilter. </summary>
 32        /// <param name="oDataType"> Identifies the concrete type of the token filter. </param>
 33        /// <param name="name"> The name of the token filter. It must only contain letters, digits, spaces, dashes or un
 34        /// <param name="articles"> The set of articles to remove. </param>
 035        internal ElisionTokenFilter(string oDataType, string name, IList<string> articles) : base(oDataType, name)
 36        {
 037            Articles = articles;
 038            ODataType = oDataType ?? "#Microsoft.Azure.Search.ElisionTokenFilter";
 039        }
 40    }
 41}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\ElisionTokenFilter.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Search.Documents.Indexes.Models
 13{
 14    public partial class ElisionTokenFilter : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Optional.IsCollectionDefined(Articles))
 20            {
 021                writer.WritePropertyName("articles");
 022                writer.WriteStartArray();
 023                foreach (var item in Articles)
 24                {
 025                    writer.WriteStringValue(item);
 26                }
 027                writer.WriteEndArray();
 28            }
 029            writer.WritePropertyName("@odata.type");
 030            writer.WriteStringValue(ODataType);
 031            writer.WritePropertyName("name");
 032            writer.WriteStringValue(Name);
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static ElisionTokenFilter DeserializeElisionTokenFilter(JsonElement element)
 37        {
 038            Optional<IList<string>> articles = default;
 039            string odataType = default;
 040            string name = default;
 041            foreach (var property in element.EnumerateObject())
 42            {
 043                if (property.NameEquals("articles"))
 44                {
 045                    List<string> array = new List<string>();
 046                    foreach (var item in property.Value.EnumerateArray())
 47                    {
 048                        array.Add(item.GetString());
 49                    }
 050                    articles = array;
 051                    continue;
 52                }
 053                if (property.NameEquals("@odata.type"))
 54                {
 055                    odataType = property.Value.GetString();
 056                    continue;
 57                }
 058                if (property.NameEquals("name"))
 59                {
 060                    name = property.Value.GetString();
 61                    continue;
 62                }
 63            }
 064            return new ElisionTokenFilter(odataType, name, Optional.ToList(articles));
 65        }
 66    }
 67}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Indexes\Models\ElisionTokenFilter.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System.Collections.Generic;
 5using Azure.Core;
 6
 7namespace Azure.Search.Documents.Indexes.Models
 8{
 9    public partial class ElisionTokenFilter
 10    {
 11        /// <summary> The set of articles to remove. </summary>
 012        public IList<string> Articles { get; }
 13    }
 14}