< Summary

Class:Azure.Analytics.Synapse.Spark.Models.SparkStatementCollection
Assembly:Azure.Analytics.Synapse.Spark
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkStatementCollection.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkStatementCollection.Serialization.cs
Covered lines:0
Uncovered lines:22
Coverable lines:22
Total lines:77
Line coverage:0% (0 of 22)
Covered branches:0
Total branches:8
Branch coverage:0% (0 of 8)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%100%
.ctor(...)-0%100%
get_Total()-0%100%
get_Statements()-0%100%
DeserializeSparkStatementCollection(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkStatementCollection.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.Analytics.Synapse.Spark.Models
 12{
 13    /// <summary> The SparkStatementCollection. </summary>
 14    public partial class SparkStatementCollection
 15    {
 16        /// <summary> Initializes a new instance of SparkStatementCollection. </summary>
 17        /// <param name="total"> . </param>
 018        internal SparkStatementCollection(int total)
 19        {
 020            Total = total;
 021            Statements = new ChangeTrackingList<SparkStatement>();
 022        }
 23
 24        /// <summary> Initializes a new instance of SparkStatementCollection. </summary>
 25        /// <param name="total"> . </param>
 26        /// <param name="statements"> . </param>
 027        internal SparkStatementCollection(int total, IReadOnlyList<SparkStatement> statements)
 28        {
 029            Total = total;
 030            Statements = statements;
 031        }
 32
 033        public int Total { get; }
 034        public IReadOnlyList<SparkStatement> Statements { get; }
 35    }
 36}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Spark\src\Generated\Models\SparkStatementCollection.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.Analytics.Synapse.Spark.Models
 13{
 14    public partial class SparkStatementCollection
 15    {
 16        internal static SparkStatementCollection DeserializeSparkStatementCollection(JsonElement element)
 17        {
 018            int totalStatements = default;
 019            Optional<IReadOnlyList<SparkStatement>> statements = default;
 020            foreach (var property in element.EnumerateObject())
 21            {
 022                if (property.NameEquals("total_statements"))
 23                {
 024                    totalStatements = property.Value.GetInt32();
 025                    continue;
 26                }
 027                if (property.NameEquals("statements"))
 28                {
 029                    List<SparkStatement> array = new List<SparkStatement>();
 030                    foreach (var item in property.Value.EnumerateArray())
 31                    {
 032                        array.Add(SparkStatement.DeserializeSparkStatement(item));
 33                    }
 034                    statements = array;
 35                    continue;
 36                }
 37            }
 038            return new SparkStatementCollection(totalStatements, Optional.ToList(statements));
 39        }
 40    }
 41}