< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor(...)-0%0%
.ctor(...)-0%100%
get_Activity()-0%100%
get_DependencyConditions()-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%
DeserializeActivityDependency(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ActivityDependency.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 System.Linq;
 12using Azure.Core;
 13
 14namespace Azure.Analytics.Synapse.Artifacts.Models
 15{
 16    /// <summary> Activity dependency information. </summary>
 17    public partial class ActivityDependency : IDictionary<string, object>
 18    {
 19        /// <summary> Initializes a new instance of ActivityDependency. </summary>
 20        /// <param name="activity"> Activity name. </param>
 21        /// <param name="dependencyConditions"> Match-Condition for the dependency. </param>
 22        /// <exception cref="ArgumentNullException"> <paramref name="activity"/> or <paramref name="dependencyConditions
 023        public ActivityDependency(string activity, IEnumerable<DependencyCondition> dependencyConditions)
 24        {
 025            if (activity == null)
 26            {
 027                throw new ArgumentNullException(nameof(activity));
 28            }
 029            if (dependencyConditions == null)
 30            {
 031                throw new ArgumentNullException(nameof(dependencyConditions));
 32            }
 33
 034            Activity = activity;
 035            DependencyConditions = dependencyConditions.ToList();
 036            AdditionalProperties = new ChangeTrackingDictionary<string, object>();
 037        }
 38
 39        /// <summary> Initializes a new instance of ActivityDependency. </summary>
 40        /// <param name="activity"> Activity name. </param>
 41        /// <param name="dependencyConditions"> Match-Condition for the dependency. </param>
 42        /// <param name="additionalProperties"> . </param>
 043        internal ActivityDependency(string activity, IList<DependencyCondition> dependencyConditions, IDictionary<string
 44        {
 045            Activity = activity;
 046            DependencyConditions = dependencyConditions;
 047            AdditionalProperties = additionalProperties;
 048        }
 49
 50        /// <summary> Activity name. </summary>
 051        public string Activity { get; set; }
 52        /// <summary> Match-Condition for the dependency. </summary>
 053        public IList<DependencyCondition> DependencyConditions { get; }
 054        internal IDictionary<string, object> AdditionalProperties { get; }
 55        /// <inheritdoc />
 056        public IEnumerator<KeyValuePair<string, object>> GetEnumerator() => AdditionalProperties.GetEnumerator();
 57        /// <inheritdoc />
 058        IEnumerator IEnumerable.GetEnumerator() => AdditionalProperties.GetEnumerator();
 59        /// <inheritdoc />
 060        public bool TryGetValue(string key, out object value) => AdditionalProperties.TryGetValue(key, out value);
 61        /// <inheritdoc />
 062        public bool ContainsKey(string key) => AdditionalProperties.ContainsKey(key);
 63        /// <inheritdoc />
 064        public ICollection<string> Keys => AdditionalProperties.Keys;
 65        /// <inheritdoc />
 066        public ICollection<object> Values => AdditionalProperties.Values;
 67        /// <inheritdoc />
 068        int ICollection<KeyValuePair<string, object>>.Count => AdditionalProperties.Count;
 69        /// <inheritdoc />
 070        public void Add(string key, object value) => AdditionalProperties.Add(key, value);
 71        /// <inheritdoc />
 072        public bool Remove(string key) => AdditionalProperties.Remove(key);
 73        /// <inheritdoc />
 074        bool ICollection<KeyValuePair<string, object>>.IsReadOnly => AdditionalProperties.IsReadOnly;
 75        /// <inheritdoc />
 076        void ICollection<KeyValuePair<string, object>>.Add(KeyValuePair<string, object> value) => AdditionalProperties.A
 77        /// <inheritdoc />
 078        bool ICollection<KeyValuePair<string, object>>.Remove(KeyValuePair<string, object> value) => AdditionalPropertie
 79        /// <inheritdoc />
 080        bool ICollection<KeyValuePair<string, object>>.Contains(KeyValuePair<string, object> value) => AdditionalPropert
 81        /// <inheritdoc />
 082        void ICollection<KeyValuePair<string, object>>.CopyTo(KeyValuePair<string, object>[] destination, int offset) =>
 83        /// <inheritdoc />
 084        void ICollection<KeyValuePair<string, object>>.Clear() => AdditionalProperties.Clear();
 85        /// <inheritdoc />
 86        public object this[string key]
 87        {
 088            get => AdditionalProperties[key];
 089            set => AdditionalProperties[key] = value;
 90        }
 91    }
 92}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\ActivityDependency.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 ActivityDependency : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            writer.WritePropertyName("activity");
 020            writer.WriteStringValue(Activity);
 021            writer.WritePropertyName("dependencyConditions");
 022            writer.WriteStartArray();
 023            foreach (var item in DependencyConditions)
 24            {
 025                writer.WriteStringValue(item.ToString());
 26            }
 027            writer.WriteEndArray();
 028            foreach (var item in AdditionalProperties)
 29            {
 030                writer.WritePropertyName(item.Key);
 031                writer.WriteObjectValue(item.Value);
 32            }
 033            writer.WriteEndObject();
 034        }
 35
 36        internal static ActivityDependency DeserializeActivityDependency(JsonElement element)
 37        {
 038            string activity = default;
 039            IList<DependencyCondition> dependencyConditions = default;
 040            IDictionary<string, object> additionalProperties = default;
 041            Dictionary<string, object> additionalPropertiesDictionary = default;
 042            foreach (var property in element.EnumerateObject())
 43            {
 044                if (property.NameEquals("activity"))
 45                {
 046                    activity = property.Value.GetString();
 047                    continue;
 48                }
 049                if (property.NameEquals("dependencyConditions"))
 50                {
 051                    List<DependencyCondition> array = new List<DependencyCondition>();
 052                    foreach (var item in property.Value.EnumerateArray())
 53                    {
 054                        array.Add(new DependencyCondition(item.GetString()));
 55                    }
 056                    dependencyConditions = array;
 057                    continue;
 58                }
 059                additionalPropertiesDictionary ??= new Dictionary<string, object>();
 060                additionalPropertiesDictionary.Add(property.Name, property.Value.GetObject());
 61            }
 062            additionalProperties = additionalPropertiesDictionary;
 063            return new ActivityDependency(activity, dependencyConditions, additionalProperties);
 64        }
 65    }
 66}