< Summary

Class:Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models.SentimentResult
Assembly:Microsoft.Azure.CognitiveServices.Language.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.TextAnalytics\src\Customizations\TextAnalytics\Models\SentimentResult.cs
Covered lines:6
Uncovered lines:4
Coverable lines:10
Total lines:67
Line coverage:60% (6 of 10)
Covered branches:0
Total branches:0

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_Score()-100%100%
get_ErrorMessage()-0%100%
get_Statistics()-0%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.TextAnalytics\src\Customizations\TextAnalytics\Models\SentimentResult.cs

#LineLine coverage
 1//
 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
 7namespace Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models
 8{
 9    using Newtonsoft.Json;
 10
 11    public partial class SentimentResult
 12    {
 13        /// <summary>
 14        /// Initializes a new instance of the SentimentResult class.
 15        /// </summary>
 016        public SentimentResult()
 17        {
 18            CustomInit();
 019        }
 20
 21        /// <summary>
 22        /// Initializes a new instance of the SentimentResult class.
 23        /// </summary>
 24        /// <param name="score">A decimal number between 0 and 1 denoting the
 25        /// sentiment of the document. A score above 0.7 usually refers to a
 26        /// positive document while a score below 0.3 normally has a negative
 27        /// connotation. Mid values refer to neutral text.</param>
 28        /// <param name="errorMessage">Error or Warning related to the document.</param>
 29        /// <param name="statistics">(Optional) if showStats=true was specified
 30        /// in the request this field will contain information about the
 31        /// request payload.</param>
 232        public SentimentResult(double? score = default(double?), string errorMessage = default(string), RequestStatistic
 33        {
 234            Score = score;
 235            ErrorMessage = errorMessage;
 236            Statistics = statistics;
 37            CustomInit();
 238        }
 39
 40        /// <summary>
 41        /// An initialization method that performs custom operations like setting defaults
 42        /// </summary>
 43        partial void CustomInit();
 44
 45        /// <summary>
 46        /// Gets or sets a decimal number between 0 and 1 denoting the
 47        /// sentiment of the document. A score above 0.7 usually refers to a
 48        /// positive document while a score below 0.3 normally has a negative
 49        /// connotation. Mid values refer to neutral text.
 50        /// </summary>
 51        [JsonProperty(PropertyName = "score")]
 452        public double? Score { get; set; }
 53
 54        /// <summary>
 55        /// Gets error or warning for the request.
 56        /// </summary>
 57        [JsonProperty(PropertyName = "ErrorMessage")]
 058        public string ErrorMessage { get; private set; }
 59
 60        /// <summary>
 61        /// Gets (Optional) if showStats=true was specified in the request this
 62        /// field will contain information about the request payload.
 63        /// </summary>
 64        [JsonProperty(PropertyName = "statistics")]
 065        public RequestStatistics Statistics { get; set; }
 66    }
 67}