< Summary

Class:Azure.AI.TextAnalytics.Models.AspectConfidenceScoreLabel
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\AspectConfidenceScoreLabel.cs
C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\AspectConfidenceScoreLabel.Serialization.cs
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:60
Line coverage:0% (0 of 15)
Covered branches:0
Total branches:6
Branch coverage:0% (0 of 6)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
get_Positive()-0%100%
get_Negative()-0%100%
DeserializeAspectConfidenceScoreLabel(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\AspectConfidenceScoreLabel.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.AI.TextAnalytics.Models
 9{
 10    /// <summary> Represents the confidence scores across all sentiment classes: positive, neutral, negative. </summary>
 11    internal partial class AspectConfidenceScoreLabel
 12    {
 13        /// <summary> Initializes a new instance of AspectConfidenceScoreLabel. </summary>
 14        /// <param name="positive"> . </param>
 15        /// <param name="negative"> . </param>
 016        internal AspectConfidenceScoreLabel(double positive, double negative)
 17        {
 018            Positive = positive;
 019            Negative = negative;
 020        }
 21
 022        public double Positive { get; }
 023        public double Negative { get; }
 24    }
 25}

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\AspectConfidenceScoreLabel.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.AI.TextAnalytics.Models
 12{
 13    internal partial class AspectConfidenceScoreLabel
 14    {
 15        internal static AspectConfidenceScoreLabel DeserializeAspectConfidenceScoreLabel(JsonElement element)
 16        {
 017            double positive = default;
 018            double negative = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("positive"))
 22                {
 023                    positive = property.Value.GetDouble();
 024                    continue;
 25                }
 026                if (property.NameEquals("negative"))
 27                {
 028                    negative = property.Value.GetDouble();
 29                    continue;
 30                }
 31            }
 032            return new AspectConfidenceScoreLabel(positive, negative);
 33        }
 34    }
 35}