< Summary

Class:Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models.Word
Assembly:Microsoft.Azure.CognitiveServices.Vision.ComputerVision
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.ComputerVision\src\Generated\Models\Word.cs
Covered lines:0
Uncovered lines:15
Coverable lines:15
Total lines:88
Line coverage:0% (0 of 15)
Covered branches:0
Total branches:4
Branch coverage:0% (0 of 4)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_BoundingBox()-0%100%
get_Text()-0%100%
get_Confidence()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Vision.ComputerVision\src\Generated\Models\Word.cs

#LineLine coverage
 1// <auto-generated>
 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// Code generated by Microsoft (R) AutoRest Code Generator.
 7// Changes may cause incorrect behavior and will be lost if the code is
 8// regenerated.
 9// </auto-generated>
 10
 11namespace Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models
 12{
 13    using Microsoft.Rest;
 14    using Newtonsoft.Json;
 15    using System.Collections;
 16    using System.Collections.Generic;
 17    using System.Linq;
 18
 19    /// <summary>
 20    /// An object representing a recognized word.
 21    /// </summary>
 22    public partial class Word
 23    {
 24        /// <summary>
 25        /// Initializes a new instance of the Word class.
 26        /// </summary>
 027        public Word()
 28        {
 29            CustomInit();
 030        }
 31
 32        /// <summary>
 33        /// Initializes a new instance of the Word class.
 34        /// </summary>
 35        /// <param name="boundingBox">Bounding box of a recognized
 36        /// word.</param>
 37        /// <param name="text">The text content of the word.</param>
 38        /// <param name="confidence">Qualitative confidence measure.</param>
 039        public Word(IList<double?> boundingBox, string text, double confidence)
 40        {
 041            BoundingBox = boundingBox;
 042            Text = text;
 043            Confidence = confidence;
 44            CustomInit();
 045        }
 46
 47        /// <summary>
 48        /// An initialization method that performs custom operations like setting defaults
 49        /// </summary>
 50        partial void CustomInit();
 51
 52        /// <summary>
 53        /// Gets or sets bounding box of a recognized word.
 54        /// </summary>
 55        [JsonProperty(PropertyName = "boundingBox")]
 056        public IList<double?> BoundingBox { get; set; }
 57
 58        /// <summary>
 59        /// Gets or sets the text content of the word.
 60        /// </summary>
 61        [JsonProperty(PropertyName = "text")]
 062        public string Text { get; set; }
 63
 64        /// <summary>
 65        /// Gets or sets qualitative confidence measure.
 66        /// </summary>
 67        [JsonProperty(PropertyName = "confidence")]
 068        public double Confidence { get; set; }
 69
 70        /// <summary>
 71        /// Validate the object.
 72        /// </summary>
 73        /// <exception cref="ValidationException">
 74        /// Thrown if validation fails
 75        /// </exception>
 76        public virtual void Validate()
 77        {
 078            if (BoundingBox == null)
 79            {
 080                throw new ValidationException(ValidationRules.CannotBeNull, "BoundingBox");
 81            }
 082            if (Text == null)
 83            {
 084                throw new ValidationException(ValidationRules.CannotBeNull, "Text");
 85            }
 086        }
 87    }
 88}