< Summary

Class:Azure.Analytics.Synapse.Artifacts.Models.NotebookLanguageInfo
Assembly:Azure.Analytics.Synapse.Artifacts
File(s):C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\NotebookLanguageInfo.cs
C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\NotebookLanguageInfo.Serialization.cs
Covered lines:15
Uncovered lines:42
Coverable lines:57
Total lines:144
Line coverage:26.3% (15 of 57)
Covered branches:3
Total branches:14
Branch coverage:21.4% (3 of 14)

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-100%100%
get_Name()-0%100%
get_CodemirrorMode()-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%
DeserializeNotebookLanguageInfo(...)-66.67%37.5%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\NotebookLanguageInfo.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;
 9using System.Collections;
 10using System.Collections.Generic;
 11using Azure.Core;
 12
 13namespace Azure.Analytics.Synapse.Artifacts.Models
 14{
 15    /// <summary> Language info. </summary>
 16    public partial class NotebookLanguageInfo : IDictionary<string, object>
 17    {
 18        /// <summary> Initializes a new instance of NotebookLanguageInfo. </summary>
 19        /// <param name="name"> The programming language which this kernel runs. </param>
 20        /// <exception cref="ArgumentNullException"> <paramref name="name"/> is null. </exception>
 021        public NotebookLanguageInfo(string name)
 22        {
 023            if (name == null)
 24            {
 025                throw new ArgumentNullException(nameof(name));
 26            }
 27
 028            Name = name;
 029            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 030        }
 31
 32        /// <summary> Initializes a new instance of NotebookLanguageInfo. </summary>
 33        /// <param name="name"> The programming language which this kernel runs. </param>
 34        /// <param name="codemirrorMode"> The codemirror mode to use for code in this language. </param>
 35        /// <param name="additionalProperties"> . </param>
 2436        internal NotebookLanguageInfo(string name, string codemirrorMode, IDictionary<string, object> additionalProperti
 37        {
 2438            Name = name;
 2439            CodemirrorMode = codemirrorMode;
 2440            AdditionalProperties = additionalProperties;
 2441        }
 42
 43        /// <summary> The programming language which this kernel runs. </summary>
 044        public string Name { get; set; }
 45        /// <summary> The codemirror mode to use for code in this language. </summary>
 046        public string CodemirrorMode { get; set; }
 047        internal IDictionary<string, object> AdditionalProperties { get; }
 48        /// <inheritdoc />
 049        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 50        /// <inheritdoc />
 051        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 52        /// <inheritdoc />
 053        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 54        /// <inheritdoc />
 055        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 56        /// <inheritdoc />
 057        public ICollection<string> Keys => AdditionalProperties.Keys;
 58        /// <inheritdoc />
 059        public ICollection<object> Values => AdditionalProperties.Values;
 60        /// <inheritdoc />
 061        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 62        /// <inheritdoc />
 063        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 64        /// <inheritdoc />
 065        public bool Remove(string key) => AdditionalProperties.Remove(key);
 66        /// <inheritdoc />
 067        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 68        /// <inheritdoc />
 069        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 70        /// <inheritdoc />
 071        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 72        /// <inheritdoc />
 073        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 74        /// <inheritdoc />
 075        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 76        /// <inheritdoc />
 077        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 78        /// <inheritdoc />
 79        public object this[string key]
 80        {
 081            get => AdditionalProperties[key];
 082            set => AdditionalProperties[key] = value;
 83        }
 84    }
 85}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\NotebookLanguageInfo.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 NotebookLanguageInfo : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("name");
 020            writer.WriteStringValue(Name);
 021            if (Optional.IsDefined(CodemirrorMode))
 22            {
 023                writer.WritePropertyName("codemirror_mode");
 024                writer.WriteStringValue(CodemirrorMode);
 25            }
 026            foreach (var item in AdditionalProperties)
 27            {
 028                writer.WritePropertyName(item.Key);
 029                writer.WriteObjectValue(item.Value);
 30            }
 031            writer.WriteEndObject();
 032        }
 33
 34        internal static NotebookLanguageInfo DeserializeNotebookLanguageInfo(JsonElement element)
 35        {
 2436            string name = default;
 2437            Optional<string> codemirrorMode = default;
 2438            IDictionary<string, object> additionalProperties = default;
 2439            Dictionary<string, object> additionalPropertiesDictionary = default;
 9640            foreach (var property in element.EnumerateObject())
 41            {
 2442                if (property.NameEquals("name"))
 43                {
 2444                    name = property.Value.GetString();
 2445                    continue;
 46                }
 047                if (property.NameEquals("codemirror_mode"))
 48                {
 049                    codemirrorMode = property.Value.GetString();
 050                    continue;
 51                }
 052                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 053                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 54            }
 2455            additionalProperties = additionalPropertiesDictionary;
 2456            return new NotebookLanguageInfo(name, codemirrorMode.Value, additionalProperties);
 57        }
 58    }
 59}