< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%0%
get_Type()-0%100%
get_FolderPath()-0%100%
get_FileName()-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%
DeserializeDatasetLocation(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DatasetLocation.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> Dataset location. </summary>
 15    public partial class DatasetLocation : IDictionary<string, object>
 16    {
 17        /// <summary> Initializes a new instance of DatasetLocation. </summary>
 018        public DatasetLocation()
 19        {
 020            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 021            Type = "DatasetLocation";
 022        }
 23
 24        /// <summary> Initializes a new instance of DatasetLocation. </summary>
 25        /// <param name="type"> Type of dataset storage location. </param>
 26        /// <param name="folderPath"> Specify the folder path of dataset. Type: string (or Expression with resultType st
 27        /// <param name="fileName"> Specify the file name of dataset. Type: string (or Expression with resultType string
 28        /// <param name="additionalProperties"> . </param>
 029        internal DatasetLocation(string type, object folderPath, object fileName, IDictionary<string, object> additional
 30        {
 031            Type = type ?? "DatasetLocation";
 032            FolderPath = folderPath;
 033            FileName = fileName;
 034            AdditionalProperties = additionalProperties;
 035        }
 36
 37        /// <summary> Type of dataset storage location. </summary>
 038        internal string Type { get; set; }
 39        /// <summary> Specify the folder path of dataset. Type: string (or Expression with resultType string). </summary
 040        public object FolderPath { get; set; }
 41        /// <summary> Specify the file name of dataset. Type: string (or Expression with resultType string). </summary>
 042        public object FileName { get; set; }
 043        internal IDictionary<string, object> AdditionalProperties { get; }
 44        /// <inheritdoc />
 045        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 46        /// <inheritdoc />
 047        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 48        /// <inheritdoc />
 049        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 50        /// <inheritdoc />
 051        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 52        /// <inheritdoc />
 053        public ICollection<string> Keys => AdditionalProperties.Keys;
 54        /// <inheritdoc />
 055        public ICollection<object> Values => AdditionalProperties.Values;
 56        /// <inheritdoc />
 057        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 58        /// <inheritdoc />
 059        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 60        /// <inheritdoc />
 061        public bool Remove(string key) => AdditionalProperties.Remove(key);
 62        /// <inheritdoc />
 063        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 64        /// <inheritdoc />
 065        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 66        /// <inheritdoc />
 067        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 68        /// <inheritdoc />
 069        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 70        /// <inheritdoc />
 071        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 72        /// <inheritdoc />
 073        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 74        /// <inheritdoc />
 75        public object this[string key]
 76        {
 077            get => AdditionalProperties[key];
 078            set => AdditionalProperties[key] = value;
 79        }
 80    }
 81}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\DatasetLocation.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 DatasetLocation : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("type");
 020            writer.WriteStringValue(Type);
 021            if (Optional.IsDefined(FolderPath))
 22            {
 023                writer.WritePropertyName("folderPath");
 024                writer.WriteObjectValue(FolderPath);
 25            }
 026            if (Optional.IsDefined(FileName))
 27            {
 028                writer.WritePropertyName("fileName");
 029                writer.WriteObjectValue(FileName);
 30            }
 031            foreach (var item in AdditionalProperties)
 32            {
 033                writer.WritePropertyName(item.Key);
 034                writer.WriteObjectValue(item.Value);
 35            }
 036            writer.WriteEndObject();
 037        }
 38
 39        internal static DatasetLocation DeserializeDatasetLocation(JsonElement element)
 40        {
 041            string type = default;
 042            Optional<object> folderPath = default;
 043            Optional<object> fileName = default;
 044            IDictionary<string, object> additionalProperties = default;
 045            Dictionary<string, object> additionalPropertiesDictionary = default;
 046            foreach (var property in element.EnumerateObject())
 47            {
 048                if (property.NameEquals("type"))
 49                {
 050                    type = property.Value.GetString();
 051                    continue;
 52                }
 053                if (property.NameEquals("folderPath"))
 54                {
 055                    folderPath = property.Value.GetObject();
 056                    continue;
 57                }
 058                if (property.NameEquals("fileName"))
 59                {
 060                    fileName = property.Value.GetObject();
 061                    continue;
 62                }
 063                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 064                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 65            }
 066            additionalProperties = additionalPropertiesDictionary;
 067            return new DatasetLocation(type, folderPath.Value, fileName.Value, additionalProperties);
 68        }
 69    }
 70}