< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\ClassicSimilarity.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
 8namespace Azure.Search.Documents.Indexes.Models
 9{
 10    /// <summary> Legacy similarity algorithm which uses the Lucene TFIDFSimilarity implementation of TF-IDF. This varia
 11    public partial class ClassicSimilarity : SimilarityAlgorithm
 12    {
 13        /// <summary> Initializes a new instance of ClassicSimilarity. </summary>
 014        public ClassicSimilarity()
 15        {
 016            ODataType = "#Microsoft.Azure.Search.ClassicSimilarity";
 017        }
 18
 19        /// <summary> Initializes a new instance of ClassicSimilarity. </summary>
 20        /// <param name="oDataType"> . </param>
 021        internal ClassicSimilarity(string oDataType) : base(oDataType)
 22        {
 023            ODataType = oDataType ?? "#Microsoft.Azure.Search.ClassicSimilarity";
 024        }
 25    }
 26}

C:\Git\azure-sdk-for-net\sdk\search\Azure.Search.Documents\src\Generated\Models\ClassicSimilarity.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.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.Search.Documents.Indexes.Models
 12{
 13    public partial class ClassicSimilarity : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("@odata.type");
 019            writer.WriteStringValue(ODataType);
 020            writer.WriteEndObject();
 021        }
 22
 23        internal static ClassicSimilarity DeserializeClassicSimilarity(JsonElement element)
 24        {
 025            string odataType = default;
 026            foreach (var property in element.EnumerateObject())
 27            {
 028                if (property.NameEquals("@odata.type"))
 29                {
 030                    odataType = property.Value.GetString();
 31                    continue;
 32                }
 33            }
 034            return new ClassicSimilarity(odataType);
 35        }
 36    }
 37}