< Summary

Class:Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models.SpellingTokenSuggestion
Assembly:Microsoft.Azure.CognitiveServices.Language.SpellCheck
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.SpellCheck\src\Generated\Models\SpellingTokenSuggestion.cs
Covered lines:4
Uncovered lines:9
Coverable lines:13
Total lines:68
Line coverage:30.7% (4 of 13)
Covered branches:0
Total branches:2
Branch coverage:0% (0 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-100%100%
.ctor(...)-0%100%
get_Suggestion()-100%100%
get_Score()-100%100%
get_PingUrlSuffix()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Language.SpellCheck\src\Generated\Models\SpellingTokenSuggestion.cs

#LineLine coverage
 1// <auto-generated>
 2// Code generated by Microsoft (R) AutoRest Code Generator.
 3// Changes may cause incorrect behavior and will be lost if the code is
 4// regenerated.
 5// </auto-generated>
 6
 7namespace Microsoft.Azure.CognitiveServices.Language.SpellCheck.Models
 8{
 9    using Microsoft.Rest;
 10    using Newtonsoft.Json;
 11    using System.Linq;
 12
 13    public partial class SpellingTokenSuggestion
 14    {
 15        /// <summary>
 16        /// Initializes a new instance of the SpellingTokenSuggestion class.
 17        /// </summary>
 118        public SpellingTokenSuggestion()
 19        {
 20            CustomInit();
 121        }
 22
 23        /// <summary>
 24        /// Initializes a new instance of the SpellingTokenSuggestion class.
 25        /// </summary>
 026        public SpellingTokenSuggestion(string suggestion, double? score = default(double?), string pingUrlSuffix = defau
 27        {
 028            Suggestion = suggestion;
 029            Score = score;
 030            PingUrlSuffix = pingUrlSuffix;
 31            CustomInit();
 032        }
 33
 34        /// <summary>
 35        /// An initialization method that performs custom operations like setting defaults
 36        /// </summary>
 37        partial void CustomInit();
 38
 39        /// <summary>
 40        /// </summary>
 41        [JsonProperty(PropertyName = "suggestion")]
 242        public string Suggestion { get; set; }
 43
 44        /// <summary>
 45        /// </summary>
 46        [JsonProperty(PropertyName = "score")]
 247        public double? Score { get; private set; }
 48
 49        /// <summary>
 50        /// </summary>
 51        [JsonProperty(PropertyName = "pingUrlSuffix")]
 052        public string PingUrlSuffix { get; private set; }
 53
 54        /// <summary>
 55        /// Validate the object.
 56        /// </summary>
 57        /// <exception cref="ValidationException">
 58        /// Thrown if validation fails
 59        /// </exception>
 60        public virtual void Validate()
 61        {
 062            if (Suggestion == null)
 63            {
 064                throw new ValidationException(ValidationRules.CannotBeNull, "Suggestion");
 65            }
 066        }
 67    }
 68}