/// <summary>
        /// Initializes a new instance of the <see cref="ExternalPropertyFiles" /> class from the specified instance.
        /// </summary>
        /// <param name="other">
        /// The instance from which the new instance is to be initialized.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// Thrown if <paramref name="other" /> is null.
        /// </exception>
        public ExternalPropertyFiles(ExternalPropertyFiles other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            Init(other.Conversion, other.Graphs, other.ExternalizedProperties, other.Artifacts, other.Invocations, other.LogicalLocations, other.Results, other.Tool);
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="ExternalPropertyFiles" /> class from the specified instance.
        /// </summary>
        /// <param name="other">
        /// The instance from which the new instance is to be initialized.
        /// </param>
        /// <exception cref="ArgumentNullException">
        /// Thrown if <paramref name="other" /> is null.
        /// </exception>
        public ExternalPropertyFiles(ExternalPropertyFiles other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            Init(other.Conversion, other.Graphs, other.ExternalizedProperties, other.Artifacts, other.Invocations, other.LogicalLocations, other.ThreadFlowLocations, other.Results, other.Taxonomies, other.Addresses, other.Driver, other.Extensions, other.Properties);
        }
        public virtual ExternalPropertyFiles VisitExternalPropertyFiles(ExternalPropertyFiles node)
        {
            if (node != null)
            {
                node.Conversion             = VisitNullChecked(node.Conversion);
                node.Graphs                 = VisitNullChecked(node.Graphs);
                node.ExternalizedProperties = VisitNullChecked(node.ExternalizedProperties);
                if (node.Artifacts != null)
                {
                    for (int index_0 = 0; index_0 < node.Artifacts.Count; ++index_0)
                    {
                        node.Artifacts[index_0] = VisitNullChecked(node.Artifacts[index_0]);
                    }
                }

                if (node.Invocations != null)
                {
                    for (int index_0 = 0; index_0 < node.Invocations.Count; ++index_0)
                    {
                        node.Invocations[index_0] = VisitNullChecked(node.Invocations[index_0]);
                    }
                }

                if (node.LogicalLocations != null)
                {
                    for (int index_0 = 0; index_0 < node.LogicalLocations.Count; ++index_0)
                    {
                        node.LogicalLocations[index_0] = VisitNullChecked(node.LogicalLocations[index_0]);
                    }
                }

                if (node.Results != null)
                {
                    for (int index_0 = 0; index_0 < node.Results.Count; ++index_0)
                    {
                        node.Results[index_0] = VisitNullChecked(node.Results[index_0]);
                    }
                }

                node.Tool = VisitNullChecked(node.Tool);
            }

            return(node);
        }
 public bool ValueEquals(ExternalPropertyFiles other) => ValueComparer.Equals(this, other);
Exemple #5
0
        private void Init(Tool tool, IEnumerable <Invocation> invocations, Conversion conversion, IEnumerable <VersionControlDetails> versionControlProvenance, IDictionary <string, ArtifactLocation> originalUriBaseIds, IEnumerable <Artifact> artifacts, IEnumerable <LogicalLocation> logicalLocations, IDictionary <string, Graph> graphs, IEnumerable <Result> results, RunAutomationDetails id, IEnumerable <RunAutomationDetails> aggregateIds, string baselineInstanceGuid, string markdownMessageMimeType, string redactionToken, string defaultFileEncoding, string defaultSourceLanguage, IEnumerable <string> newlineSequences, ColumnKind columnKind, ExternalPropertyFiles externalPropertyFiles, IDictionary <string, SerializedPropertyInfo> properties)
        {
            if (tool != null)
            {
                Tool = new Tool(tool);
            }

            if (invocations != null)
            {
                var destination_0 = new List <Invocation>();
                foreach (var value_0 in invocations)
                {
                    if (value_0 == null)
                    {
                        destination_0.Add(null);
                    }
                    else
                    {
                        destination_0.Add(new Invocation(value_0));
                    }
                }

                Invocations = destination_0;
            }

            if (conversion != null)
            {
                Conversion = new Conversion(conversion);
            }

            if (versionControlProvenance != null)
            {
                var destination_1 = new List <VersionControlDetails>();
                foreach (var value_1 in versionControlProvenance)
                {
                    if (value_1 == null)
                    {
                        destination_1.Add(null);
                    }
                    else
                    {
                        destination_1.Add(new VersionControlDetails(value_1));
                    }
                }

                VersionControlProvenance = destination_1;
            }

            if (originalUriBaseIds != null)
            {
                OriginalUriBaseIds = new Dictionary <string, ArtifactLocation>();
                foreach (var value_2 in originalUriBaseIds)
                {
                    OriginalUriBaseIds.Add(value_2.Key, new ArtifactLocation(value_2.Value));
                }
            }

            if (artifacts != null)
            {
                var destination_2 = new List <Artifact>();
                foreach (var value_3 in artifacts)
                {
                    if (value_3 == null)
                    {
                        destination_2.Add(null);
                    }
                    else
                    {
                        destination_2.Add(new Artifact(value_3));
                    }
                }

                Artifacts = destination_2;
            }

            if (logicalLocations != null)
            {
                var destination_3 = new List <LogicalLocation>();
                foreach (var value_4 in logicalLocations)
                {
                    if (value_4 == null)
                    {
                        destination_3.Add(null);
                    }
                    else
                    {
                        destination_3.Add(new LogicalLocation(value_4));
                    }
                }

                LogicalLocations = destination_3;
            }

            if (graphs != null)
            {
                Graphs = new Dictionary <string, Graph>();
                foreach (var value_5 in graphs)
                {
                    Graphs.Add(value_5.Key, new Graph(value_5.Value));
                }
            }

            if (results != null)
            {
                var destination_4 = new List <Result>();
                foreach (var value_6 in results)
                {
                    if (value_6 == null)
                    {
                        destination_4.Add(null);
                    }
                    else
                    {
                        destination_4.Add(new Result(value_6));
                    }
                }

                Results = destination_4;
            }

            if (id != null)
            {
                Id = new RunAutomationDetails(id);
            }

            if (aggregateIds != null)
            {
                var destination_5 = new List <RunAutomationDetails>();
                foreach (var value_7 in aggregateIds)
                {
                    if (value_7 == null)
                    {
                        destination_5.Add(null);
                    }
                    else
                    {
                        destination_5.Add(new RunAutomationDetails(value_7));
                    }
                }

                AggregateIds = destination_5;
            }

            BaselineInstanceGuid    = baselineInstanceGuid;
            MarkdownMessageMimeType = markdownMessageMimeType;
            RedactionToken          = redactionToken;
            DefaultFileEncoding     = defaultFileEncoding;
            DefaultSourceLanguage   = defaultSourceLanguage;
            if (newlineSequences != null)
            {
                var destination_6 = new List <string>();
                foreach (var value_8 in newlineSequences)
                {
                    destination_6.Add(value_8);
                }

                NewlineSequences = destination_6;
            }

            ColumnKind = columnKind;
            if (externalPropertyFiles != null)
            {
                ExternalPropertyFiles = new ExternalPropertyFiles(externalPropertyFiles);
            }

            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
Exemple #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Run" /> class from the supplied values.
 /// </summary>
 /// <param name="tool">
 /// An initialization value for the <see cref="P:Tool" /> property.
 /// </param>
 /// <param name="invocations">
 /// An initialization value for the <see cref="P:Invocations" /> property.
 /// </param>
 /// <param name="conversion">
 /// An initialization value for the <see cref="P:Conversion" /> property.
 /// </param>
 /// <param name="versionControlProvenance">
 /// An initialization value for the <see cref="P:VersionControlProvenance" /> property.
 /// </param>
 /// <param name="originalUriBaseIds">
 /// An initialization value for the <see cref="P:OriginalUriBaseIds" /> property.
 /// </param>
 /// <param name="artifacts">
 /// An initialization value for the <see cref="P:Artifacts" /> property.
 /// </param>
 /// <param name="logicalLocations">
 /// An initialization value for the <see cref="P:LogicalLocations" /> property.
 /// </param>
 /// <param name="graphs">
 /// An initialization value for the <see cref="P:Graphs" /> property.
 /// </param>
 /// <param name="results">
 /// An initialization value for the <see cref="P:Results" /> property.
 /// </param>
 /// <param name="id">
 /// An initialization value for the <see cref="P:Id" /> property.
 /// </param>
 /// <param name="aggregateIds">
 /// An initialization value for the <see cref="P:AggregateIds" /> property.
 /// </param>
 /// <param name="baselineInstanceGuid">
 /// An initialization value for the <see cref="P:BaselineInstanceGuid" /> property.
 /// </param>
 /// <param name="markdownMessageMimeType">
 /// An initialization value for the <see cref="P:MarkdownMessageMimeType" /> property.
 /// </param>
 /// <param name="redactionToken">
 /// An initialization value for the <see cref="P:RedactionToken" /> property.
 /// </param>
 /// <param name="defaultFileEncoding">
 /// An initialization value for the <see cref="P:DefaultFileEncoding" /> property.
 /// </param>
 /// <param name="defaultSourceLanguage">
 /// An initialization value for the <see cref="P:DefaultSourceLanguage" /> property.
 /// </param>
 /// <param name="newlineSequences">
 /// An initialization value for the <see cref="P:NewlineSequences" /> property.
 /// </param>
 /// <param name="columnKind">
 /// An initialization value for the <see cref="P:ColumnKind" /> property.
 /// </param>
 /// <param name="externalPropertyFiles">
 /// An initialization value for the <see cref="P:ExternalPropertyFiles" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P:Properties" /> property.
 /// </param>
 public Run(Tool tool, IEnumerable <Invocation> invocations, Conversion conversion, IEnumerable <VersionControlDetails> versionControlProvenance, IDictionary <string, ArtifactLocation> originalUriBaseIds, IEnumerable <Artifact> artifacts, IEnumerable <LogicalLocation> logicalLocations, IDictionary <string, Graph> graphs, IEnumerable <Result> results, RunAutomationDetails id, IEnumerable <RunAutomationDetails> aggregateIds, string baselineInstanceGuid, string markdownMessageMimeType, string redactionToken, string defaultFileEncoding, string defaultSourceLanguage, IEnumerable <string> newlineSequences, ColumnKind columnKind, ExternalPropertyFiles externalPropertyFiles, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(tool, invocations, conversion, versionControlProvenance, originalUriBaseIds, artifacts, logicalLocations, graphs, results, id, aggregateIds, baselineInstanceGuid, markdownMessageMimeType, redactionToken, defaultFileEncoding, defaultSourceLanguage, newlineSequences, columnKind, externalPropertyFiles, properties);
 }