< Summary

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

Metrics

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

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\UserProperty.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> User property. </summary>
 13    public partial class UserProperty
 14    {
 15        /// <summary> Initializes a new instance of UserProperty. </summary>
 16        /// <param name="name"> User property name. </param>
 17        /// <param name="value"> User property value. Type: string (or Expression with resultType string). </param>
 18        /// <exception cref="ArgumentNullException"> <paramref name="name"/> or <paramref name="value"/> is null. </exce
 019        public UserProperty(string name, object value)
 20        {
 021            if (name == null)
 22            {
 023                throw new ArgumentNullException(nameof(name));
 24            }
 025            if (value == null)
 26            {
 027                throw new ArgumentNullException(nameof(value));
 28            }
 29
 030            Name = name;
 031            Value = value;
 032        }
 33
 34        /// <summary> User property name. </summary>
 035        public string Name { get; set; }
 36        /// <summary> User property value. Type: string (or Expression with resultType string). </summary>
 037        public object Value { get; set; }
 38    }
 39}

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