< Summary

Class:Microsoft.Azure.CognitiveServices.Language.TextAnalytics.Models.KeyPhraseResult
Assembly:Microsoft.Azure.CognitiveServices.Language.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.TextAnalytics\src\Customizations\TextAnalytics\Models\KeyPhraseResult.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_KeyPhrases()-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\KeyPhraseResult.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 System.Collections.Generic;
 10    using Newtonsoft.Json;
 11
 12    public partial class KeyPhraseResult
 13    {
 14        /// <summary>
 15        /// Initializes a new instance of the KeyPhraseResult class.
 16        /// </summary>
 017        public KeyPhraseResult()
 18        {
 19            CustomInit();
 020        }
 21
 22        /// <summary>
 23        /// Initializes a new instance of the KeyPhraseResult class.
 24        /// </summary>
 25        /// <param name="keyPhrases">A list of representative words or phrases.
 26        /// The number of key phrases returned is proportional to the number of
 27        /// words in the input document.</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 KeyPhraseResult(IList<string> keyPhrases = default(IList<string>), string errorMessage = default(string),
 33        {
 234            KeyPhrases = keyPhrases;
 235            ErrorMessage = errorMessage;
 236            Statistics = statistics;
 37            CustomInit();
 238        }
 39
 40
 41        /// <summary>
 42        /// An initialization method that performs custom operations like setting defaults
 43        /// </summary>
 44        partial void CustomInit();
 45
 46        /// <summary>
 47        /// Gets a list of representative words or phrases. The number of key
 48        /// phrases returned is proportional to the number of words in the
 49        /// input document.
 50        /// </summary>
 51        [JsonProperty(PropertyName = "keyPhrases")]
 452        public IList<string> KeyPhrases { get; private 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}