< Summary

Class:Microsoft.Azure.CognitiveServices.Search.EntitySearch.Models.SearchResultsAnswer
Assembly:Microsoft.Azure.CognitiveServices.Search.BingEntitySearch
File(s):C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingEntitySearch\src\Generated\EntitySearch\Models\SearchResultsAnswer.cs
Covered lines:2
Uncovered lines:7
Coverable lines:9
Total lines:63
Line coverage:22.2% (2 of 9)
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_QueryContext()-0%100%
Validate()-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\cognitiveservices\Search.BingEntitySearch\src\Generated\EntitySearch\Models\SearchResultsAnswer.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.Search.EntitySearch.Models
 8{
 9    using Newtonsoft.Json;
 10    using System.Collections;
 11    using System.Collections.Generic;
 12    using System.Linq;
 13
 14    public partial class SearchResultsAnswer : Answer
 15    {
 16        /// <summary>
 17        /// Initializes a new instance of the SearchResultsAnswer class.
 18        /// </summary>
 219        public SearchResultsAnswer()
 20        {
 21            CustomInit();
 222        }
 23
 24        /// <summary>
 25        /// Initializes a new instance of the SearchResultsAnswer class.
 26        /// </summary>
 27        /// <param name="id">A String identifier.</param>
 28        /// <param name="contractualRules">A list of rules that you must adhere
 29        /// to if you display the item.</param>
 30        /// <param name="webSearchUrl">The URL To Bing's search result for this
 31        /// item.</param>
 32        public SearchResultsAnswer(string id = default(string), IList<ContractualRulesContractualRule> contractualRules 
 033            : base(id, contractualRules, webSearchUrl)
 34        {
 035            QueryContext = queryContext;
 36            CustomInit();
 037        }
 38
 39        /// <summary>
 40        /// An initialization method that performs custom operations like setting defaults
 41        /// </summary>
 42        partial void CustomInit();
 43
 44        /// <summary>
 45        /// </summary>
 46        [JsonProperty(PropertyName = "queryContext")]
 047        public QueryContext QueryContext { get; private set; }
 48
 49        /// <summary>
 50        /// Validate the object.
 51        /// </summary>
 52        /// <exception cref="Rest.ValidationException">
 53        /// Thrown if validation fails
 54        /// </exception>
 55        public virtual void Validate()
 56        {
 057            if (QueryContext != null)
 58            {
 059                QueryContext.Validate();
 60            }
 061        }
 62    }
 63}