< Summary

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

Metrics

MethodCyclomatic complexity Line coverage Branch coverage
.ctor()-0%100%
.ctor(...)-0%100%
get_LinkedServices()-0%100%
get_Datasets()-0%100%
Azure.Core.IUtf8JsonSerializable.Write(...)-0%0%
DeserializeCustomActivityReferenceObject(...)-0%0%

File(s)

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\CustomActivityReferenceObject.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 Azure.Core;
 10
 11namespace Azure.Analytics.Synapse.Artifacts.Models
 12{
 13    /// <summary> Reference objects for custom activity. </summary>
 14    public partial class CustomActivityReferenceObject
 15    {
 16        /// <summary> Initializes a new instance of CustomActivityReferenceObject. </summary>
 017        public CustomActivityReferenceObject()
 18        {
 019            LinkedServices = new ChangeTrackingList<LinkedServiceReference>();
 020            Datasets = new ChangeTrackingList<DatasetReference>();
 021        }
 22
 23        /// <summary> Initializes a new instance of CustomActivityReferenceObject. </summary>
 24        /// <param name="linkedServices"> Linked service references. </param>
 25        /// <param name="datasets"> Dataset references. </param>
 026        internal CustomActivityReferenceObject(IList<LinkedServiceReference> linkedServices, IList<DatasetReference> dat
 27        {
 028            LinkedServices = linkedServices;
 029            Datasets = datasets;
 030        }
 31
 32        /// <summary> Linked service references. </summary>
 033        public IList<LinkedServiceReference> LinkedServices { get; }
 34        /// <summary> Dataset references. </summary>
 035        public IList<DatasetReference> Datasets { get; }
 36    }
 37}

C:\Git\azure-sdk-for-net\sdk\synapse\Azure.Analytics.Synapse.Artifacts\src\Generated\Models\CustomActivityReferenceObject.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 CustomActivityReferenceObject : IUtf8JsonSerializable
 15    {
 16        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 17        {
 018            writer.WriteStartObject();
 019            if (Optional.IsCollectionDefined(LinkedServices))
 20            {
 021                writer.WritePropertyName("linkedServices");
 022                writer.WriteStartArray();
 023                foreach (var item in LinkedServices)
 24                {
 025                    writer.WriteObjectValue(item);
 26                }
 027                writer.WriteEndArray();
 28            }
 029            if (Optional.IsCollectionDefined(Datasets))
 30            {
 031                writer.WritePropertyName("datasets");
 032                writer.WriteStartArray();
 033                foreach (var item in Datasets)
 34                {
 035                    writer.WriteObjectValue(item);
 36                }
 037                writer.WriteEndArray();
 38            }
 039            writer.WriteEndObject();
 040        }
 41
 42        internal static CustomActivityReferenceObject DeserializeCustomActivityReferenceObject(JsonElement element)
 43        {
 044            Optional<IList<LinkedServiceReference>> linkedServices = default;
 045            Optional<IList<DatasetReference>> datasets = default;
 046            foreach (var property in element.EnumerateObject())
 47            {
 048                if (property.NameEquals("linkedServices"))
 49                {
 050                    List<LinkedServiceReference> array = new List<LinkedServiceReference>();
 051                    foreach (var item in property.Value.EnumerateArray())
 52                    {
 053                        array.Add(LinkedServiceReference.DeserializeLinkedServiceReference(item));
 54                    }
 055                    linkedServices = array;
 056                    continue;
 57                }
 058                if (property.NameEquals("datasets"))
 59                {
 060                    List<DatasetReference> array = new List<DatasetReference>();
 061                    foreach (var item in property.Value.EnumerateArray())
 62                    {
 063                        array.Add(DatasetReference.DeserializeDatasetReference(item));
 64                    }
 065                    datasets = array;
 66                    continue;
 67                }
 68            }
 069            return new CustomActivityReferenceObject(Optional.ToList(linkedServices), Optional.ToList(datasets));
 70        }
 71    }
 72}