< Summary

Class:Azure.AI.TextAnalytics.RecognizeLinkedEntitiesResult
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\RecognizeLinkedEntitiesResult.cs
Covered lines:7
Uncovered lines:0
Coverable lines:7
Total lines:42
Line coverage:100% (7 of 7)
Covered branches:2
Total branches:2
Branch coverage:100% (2 of 2)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-100%100%
.ctor(...)-100%100%
get_Entities()-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\RecognizeLinkedEntitiesResult.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4using System;
 5
 6namespace Azure.AI.TextAnalytics
 7{
 8    /// <summary>
 9    /// The result of the recognize linked entities operation on a
 10    /// document, containing a collection of the <see cref="LinkedEntity"/>
 11    /// objects identified in that document.
 12    /// </summary>
 13    public class RecognizeLinkedEntitiesResult : TextAnalyticsResult
 14    {
 15        private readonly LinkedEntityCollection _linkedEntities;
 16
 17        internal RecognizeLinkedEntitiesResult(string id, TextDocumentStatistics statistics, LinkedEntityCollection link
 4818            : base(id, statistics)
 19        {
 4820            _linkedEntities = linkedEntities;
 4821        }
 22
 823        internal RecognizeLinkedEntitiesResult(string id, TextAnalyticsError error) : base(id, error) { }
 24
 25        /// <summary>
 26        /// Gets the collection of linked entities identified in the document.
 27        /// </summary>
 28        public LinkedEntityCollection Entities
 29        {
 30            get
 31            {
 4432                if (HasError)
 33                {
 34#pragma warning disable CA1065 // Do not raise exceptions in unexpected locations
 435                    throw new InvalidOperationException($"Cannot access result for document {Id}, due to error {Error.Er
 36#pragma warning restore CA1065 // Do not raise exceptions in unexpected locations
 37                }
 4038                return _linkedEntities;
 39            }
 40        }
 41    }
 42}

Methods/Properties

.ctor(...)
.ctor(...)
get_Entities()