< Summary

Class:Azure.AI.TextAnalytics.Models.AspectRelation
Assembly:Azure.AI.TextAnalytics
File(s):C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\AspectRelation.cs
C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\AspectRelation.Serialization.cs
Covered lines:0
Uncovered lines:17
Coverable lines:17
Total lines:70
Line coverage:0% (0 of 17)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
get_RelationType()-0%100%
get_Ref()-0%100%
DeserializeAspectRelation(...)-0%0%

File(s)

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

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System;
 9
 10namespace Azure.AI.TextAnalytics.Models
 11{
 12    /// <summary> The AspectRelation. </summary>
 13    internal partial class AspectRelation
 14    {
 15        /// <summary> Initializes a new instance of AspectRelation. </summary>
 16        /// <param name="relationType"> The type related to the aspect. </param>
 17        /// <param name="ref"> The JSON pointer indicating the linked object. </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="ref"/> is null. </exception>
 019        internal AspectRelation(AspectRelationType relationType, string @ref)
 20        {
 021            if (@ref == null)
 22            {
 023                throw new ArgumentNullException(nameof(@ref));
 24            }
 25
 026            RelationType = relationType;
 027            Ref = @ref;
 028        }
 29
 30        /// <summary> The type related to the aspect. </summary>
 031        public AspectRelationType RelationType { get; }
 32        /// <summary> The JSON pointer indicating the linked object. </summary>
 033        public string Ref { get; }
 34    }
 35}

C:\Git\azure-sdk-for-net\sdk\textanalytics\Azure.AI.TextAnalytics\src\Generated\Models\AspectRelation.Serialization.cs

#LineLine coverage
 1// Copyright (c) Microsoft Corporation. All rights reserved.
 2// Licensed under the MIT License.
 3
 4// <auto-generated/>
 5
 6#nullable disable
 7
 8using System.Text.Json;
 9using Azure.Core;
 10
 11namespace Azure.AI.TextAnalytics.Models
 12{
 13    internal partial class AspectRelation
 14    {
 15        internal static AspectRelation DeserializeAspectRelation(JsonElement element)
 16        {
 017            AspectRelationType relationType = default;
 018            string @ref = default;
 019            foreach (var property in element.EnumerateObject())
 20            {
 021                if (property.NameEquals("relationType"))
 22                {
 023                    relationType = new AspectRelationType(property.Value.GetString());
 024                    continue;
 25                }
 026                if (property.NameEquals("ref"))
 27                {
 028                    @ref = property.Value.GetString();
 29                    continue;
 30                }
 31            }
 032            return new AspectRelation(relationType, @ref);
 33        }
 34    }
 35}