< Summary

Class:Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models.LanguageResult
Assembly:Microsoft.Azure.CognitiveServices.Language.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.TextAnalytics\src\Customizations\TextAnalytics\Models\LanguageResult.cs
Covered lines:6
Uncovered lines:4
Coverable lines:10
Total lines:63
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_DetectedLanguages()-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\LanguageResult.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    using System.Collections.Generic;
 11
 12    public partial class LanguageResult
 13    {
 14        /// <summary>
 15        /// Initializes a new instance of the LanguageResult class.
 16        /// </summary>
 017        public LanguageResult()
 18        {
 19            CustomInit();
 020        }
 21
 22        /// <summary>
 23        /// Initializes a new instance of the LanguageResult class.
 24        /// </summary>
 25        /// <param name="detectedLanguages">A list of extracted languages.</param>
 26        /// <param name="errorMessage">Error or Warning related to the document.</param>
 27        /// <param name="statistics">(Optional) if showStats=true was specified
 28        /// in the request this field will contain information about the
 29        /// request payload.</param>
 230        public LanguageResult(IList<DetectedLanguage> detectedLanguages = default(IList<DetectedLanguage>), string error
 31        {
 232            DetectedLanguages = detectedLanguages;
 233            ErrorMessage = errorMessage;
 234            Statistics = statistics;
 35            CustomInit();
 236        }
 37
 38        /// <summary>
 39        /// An initialization method that performs custom operations like setting defaults
 40        /// </summary>
 41        partial void CustomInit();
 42
 43        /// <summary>
 44        /// Gets or sets a list of extracted languages.
 45        /// </summary>
 46        [JsonProperty(PropertyName = "detectedLanguages")]
 847        public IList<DetectedLanguage> DetectedLanguages { get; set; }
 48
 49        /// <summary>
 50        /// Gets error or warning for the request.
 51        /// </summary>
 52        [JsonProperty(PropertyName = "ErrorMessage")]
 053        public string ErrorMessage { get; private set; }
 54
 55        /// <summary>
 56        /// Gets (Optional) if showStats=true was specified in the request this
 57        /// field will contain information about the request payload.
 58        /// </summary>
 59        [JsonProperty(PropertyName = "statistics")]
 060        public RequestStatistics Statistics { get; private set; }
 61
 62    }
 63}