< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_Language()-0%100%
get_AdditionalProperties()-0%100%
GetEnumerator()-0%100%
System.Collections.IEnumerable.GetEnumerator()-0%100%
TryGetValue(...)-0%100%
ContainsKey(...)-0%100%
get_Keys()-0%100%
get_Values()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_Count()-0%100%
Add(...)-0%100%
Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.get_IsReadOnly()-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Add(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Remove(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Contains(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.CopyTo(...)-0%100%
System.Collections.Generic.ICollection<System.Collections.Generic.KeyValuePair<System.String,System.Object>>.Clear()-0%100%
get_Item(...)-0%100%
set_Item(...)-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeSqlScriptMetadata(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SqlScriptMetadata.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;
 9using System.Collections.Generic;
 10using Azure.Core;
 11
 12namespace Azure.Analytics.Synapse.Artifacts.Models
 13{
 14    /// <summary> The metadata of the SQL script. </summary>
 15    public partial class SqlScriptMetadata : IDictionary<string, object>
 16    {
 17        /// <summary> Initializes a new instance of SqlScriptMetadata. </summary>
 018        public SqlScriptMetadata()
 19        {
 020            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 021        }
 22
 23        /// <summary> Initializes a new instance of SqlScriptMetadata. </summary>
 24        /// <param name="language"> The language of the SQL script. </param>
 25        /// <param name="additionalProperties"> . </param>
 026        internal SqlScriptMetadata(string language, IDictionary<string, object> additionalProperties)
 27        {
 028            Language = language;
 029            AdditionalProperties = additionalProperties;
 030        }
 31
 32        /// <summary> The language of the SQL script. </summary>
 033        public string Language { get; set; }
 034        internal IDictionary<string, object> AdditionalProperties { get; }
 35        /// <inheritdoc />
 036        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 37        /// <inheritdoc />
 038        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 39        /// <inheritdoc />
 040        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 41        /// <inheritdoc />
 042        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 43        /// <inheritdoc />
 044        public ICollection<string> Keys => AdditionalProperties.Keys;
 45        /// <inheritdoc />
 046        public ICollection<object> Values => AdditionalProperties.Values;
 47        /// <inheritdoc />
 048        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 49        /// <inheritdoc />
 050        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 51        /// <inheritdoc />
 052        public bool Remove(string key) => AdditionalProperties.Remove(key);
 53        /// <inheritdoc />
 054        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 55        /// <inheritdoc />
 056        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 57        /// <inheritdoc />
 058        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 59        /// <inheritdoc />
 060        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 61        /// <inheritdoc />
 062        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 63        /// <inheritdoc />
 064        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 65        /// <inheritdoc />
 66        public object this[string key]
 67        {
 068            get => AdditionalProperties[key];
 069            set => AdditionalProperties[key] = value;
 70        }
 71    }
 72}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\SqlScriptMetadata.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.Artifacts.Models
 13{
 14    public partial class SqlScriptMetadata : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Optional.IsDefined(Language))
 20            {
 021                writer.WritePropertyName("language");
 022                writer.WriteStringValue(Language);
 23            }
 024            foreach (var item in AdditionalProperties)
 25            {
 026                writer.WritePropertyName(item.Key);
 027                writer.WriteObjectValue(item.Value);
 28            }
 029            writer.WriteEndObject();
 030        }
 31
 32        internal static SqlScriptMetadata DeserializeSqlScriptMetadata(JsonElement element)
 33        {
 034            Optional<string> language = default;
 035            IDictionary<string, object> additionalProperties = default;
 036            Dictionary<string, object> additionalPropertiesDictionary = default;
 037            foreach (var property in element.EnumerateObject())
 38            {
 039                if (property.NameEquals("language"))
 40                {
 041                    language = property.Value.GetString();
 042                    continue;
 43                }
 044                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 045                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 46            }
 047            additionalProperties = additionalPropertiesDictionary;
 048            return new SqlScriptMetadata(language.Value, additionalProperties);
 49        }
 50    }
 51}