< Summary

Class:Azure.Data.Tables.Models.TableQueryResponse
Assembly:Azure.Data.Tables
File(s):C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableQueryResponse.cs
C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableQueryResponse.Serialization.cs
Covered lines:17
Uncovered lines:4
Coverable lines:21
Total lines:77
Line coverage:80.9% (17 of 21)
Covered branches:8
Total branches:8
Branch coverage:100% (8 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-100%100%
get_OdataMetadata()-0%100%
get_Value()-100%100%
DeserializeTableQueryResponse(...)-100%100%

File(s)

C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableQueryResponse.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.Collections.Generic;
 9using Azure.Core;
 10
 11namespace Azure.Data.Tables.Models
 12{
 13    /// <summary> The properties for the table query response. </summary>
 14    internal partial class TableQueryResponse
 15    {
 16        /// <summary> Initializes a new instance of TableQueryResponse. </summary>
 017        internal TableQueryResponse()
 18        {
 019            Value = new ChangeTrackingList<TableItem>();
 020        }
 21
 22        /// <summary> Initializes a new instance of TableQueryResponse. </summary>
 23        /// <param name="odataMetadata"> The metadata response of the table. </param>
 24        /// <param name="value"> List of tables. </param>
 5625        internal TableQueryResponse(string odataMetadata, IReadOnlyList<TableItem> value)
 26        {
 5627            OdataMetadata = odataMetadata;
 5628            Value = value;
 5629        }
 30
 31        /// <summary> The metadata response of the table. </summary>
 032        public string OdataMetadata { get; }
 33        /// <summary> List of tables. </summary>
 5634        public IReadOnlyList<TableItem> Value { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\tables\Azure.Data.Tables\src\Generated\Models\TableQueryResponse.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.Collections.Generic;
 9using System.Text.Json;
 10using Azure.Core;
 11
 12namespace Azure.Data.Tables.Models
 13{
 14    internal partial class TableQueryResponse
 15    {
 16        internal static TableQueryResponse DeserializeTableQueryResponse(JsonElement element)
 17        {
 5618            Optional<string> odataMetadata = default;
 5619            Optional<IReadOnlyList<TableItem>> value = default;
 28020            foreach (var property in element.EnumerateObject())
 21            {
 8422                if (property.NameEquals("odata.metadata"))
 23                {
 2824                    odataMetadata = property.Value.GetString();
 2825                    continue;
 26                }
 5627                if (property.NameEquals("value"))
 28                {
 5629                    List<TableItem> array = new List<TableItem>();
 49630                    foreach (var item in property.Value.EnumerateArray())
 31                    {
 19232                        array.Add(TableItem.DeserializeTableItem(item));
 33                    }
 5634                    value = array;
 35                    continue;
 36                }
 37            }
 5638            return new TableQueryResponse(odataMetadata.Value, Optional.ToList(value));
 39        }
 40    }
 41}