< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
get_Type()-0%100%
get_Value()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%100%
DeserializeExpression(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\Expression.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.Analytics.Synapse.Artifacts.Models
 11{
 12    /// <summary> Azure Synapse expression definition. </summary>
 13    public partial class Expression
 14    {
 15        /// <summary> Initializes a new instance of Expression. </summary>
 16        /// <param name="type"> Expression type. </param>
 17        /// <param name="value"> Expression value. </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="value"/> is null. </exception>
 019        public Expression(ExpressionType type, string value)
 20        {
 021            if (value == null)
 22            {
 023                throw new ArgumentNullException(nameof(value));
 24            }
 25
 026            Type = type;
 027            Value = value;
 028        }
 29
 30        /// <summary> Expression type. </summary>
 031        public ExpressionType Type { get; set; }
 32        /// <summary> Expression value. </summary>
 033        public string Value { get; set; }
 34    }
 35}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\Expression.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.Analytics.Synapse.Artifacts.Models
 12{
 13    public partial class Expression : IUtf8JsonSerializable
 14    {
 15        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 16        {
 017            writer.WriteStartObject();
 018            writer.WritePropertyName("type");
 019            writer.WriteStringValue(Type.ToString());
 020            writer.WritePropertyName("value");
 021            writer.WriteStringValue(Value);
 022            writer.WriteEndObject();
 023        }
 24
 25        internal static Expression DeserializeExpression(JsonElement element)
 26        {
 027            ExpressionType type = default;
 028            string value = default;
 029            foreach (var property in element.EnumerateObject())
 30            {
 031                if (property.NameEquals("type"))
 32                {
 033                    type = new ExpressionType(property.Value.GetString());
 034                    continue;
 35                }
 036                if (property.NameEquals("value"))
 37                {
 038                    value = property.Value.GetString();
 39                    continue;
 40                }
 41            }
 042            return new Expression(type, value);
 43        }
 44    }
 45}