Exemple #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="SpecialLocations" /> 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 SpecialLocations(SpecialLocations other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            Init(other.DisplayBase, other.Properties);
        }
Exemple #2
0
        private void Init(Tool tool, IEnumerable <Invocation> invocations, Conversion conversion, string language, IEnumerable <VersionControlDetails> versionControlProvenance, IDictionary <string, ArtifactLocation> originalUriBaseIds, IEnumerable <Artifact> artifacts, IEnumerable <LogicalLocation> logicalLocations, IEnumerable <Graph> graphs, IEnumerable <Result> results, RunAutomationDetails automationDetails, IEnumerable <RunAutomationDetails> runAggregates, string baselineGuid, IEnumerable <string> redactionTokens, string defaultEncoding, string defaultSourceLanguage, IEnumerable <string> newlineSequences, ColumnKind columnKind, ExternalPropertyFileReferences externalPropertyFileReferences, IEnumerable <ThreadFlowLocation> threadFlowLocations, IEnumerable <ToolComponent> taxonomies, IEnumerable <Address> addresses, IEnumerable <ToolComponent> translations, IEnumerable <ToolComponent> policies, IEnumerable <WebRequest> webRequests, IEnumerable <WebResponse> webResponses, SpecialLocations specialLocations, 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);
            }

            Language = language;
            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)
            {
                var destination_4 = new List <Graph>();
                foreach (var value_5 in graphs)
                {
                    if (value_5 == null)
                    {
                        destination_4.Add(null);
                    }
                    else
                    {
                        destination_4.Add(new Graph(value_5));
                    }
                }

                Graphs = destination_4;
            }

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

                Results = destination_5;
            }

            if (automationDetails != null)
            {
                AutomationDetails = new RunAutomationDetails(automationDetails);
            }

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

                RunAggregates = destination_6;
            }

            BaselineGuid = baselineGuid;
            if (redactionTokens != null)
            {
                var destination_7 = new List <string>();
                foreach (var value_8 in redactionTokens)
                {
                    destination_7.Add(value_8);
                }

                RedactionTokens = destination_7;
            }

            DefaultEncoding       = defaultEncoding;
            DefaultSourceLanguage = defaultSourceLanguage;
            if (newlineSequences != null)
            {
                var destination_8 = new List <string>();
                foreach (var value_9 in newlineSequences)
                {
                    destination_8.Add(value_9);
                }

                NewlineSequences = destination_8;
            }

            ColumnKind = columnKind;
            if (externalPropertyFileReferences != null)
            {
                ExternalPropertyFileReferences = new ExternalPropertyFileReferences(externalPropertyFileReferences);
            }

            if (threadFlowLocations != null)
            {
                var destination_9 = new List <ThreadFlowLocation>();
                foreach (var value_10 in threadFlowLocations)
                {
                    if (value_10 == null)
                    {
                        destination_9.Add(null);
                    }
                    else
                    {
                        destination_9.Add(new ThreadFlowLocation(value_10));
                    }
                }

                ThreadFlowLocations = destination_9;
            }

            if (taxonomies != null)
            {
                var destination_10 = new List <ToolComponent>();
                foreach (var value_11 in taxonomies)
                {
                    if (value_11 == null)
                    {
                        destination_10.Add(null);
                    }
                    else
                    {
                        destination_10.Add(new ToolComponent(value_11));
                    }
                }

                Taxonomies = destination_10;
            }

            if (addresses != null)
            {
                var destination_11 = new List <Address>();
                foreach (var value_12 in addresses)
                {
                    if (value_12 == null)
                    {
                        destination_11.Add(null);
                    }
                    else
                    {
                        destination_11.Add(new Address(value_12));
                    }
                }

                Addresses = destination_11;
            }

            if (translations != null)
            {
                var destination_12 = new List <ToolComponent>();
                foreach (var value_13 in translations)
                {
                    if (value_13 == null)
                    {
                        destination_12.Add(null);
                    }
                    else
                    {
                        destination_12.Add(new ToolComponent(value_13));
                    }
                }

                Translations = destination_12;
            }

            if (policies != null)
            {
                var destination_13 = new List <ToolComponent>();
                foreach (var value_14 in policies)
                {
                    if (value_14 == null)
                    {
                        destination_13.Add(null);
                    }
                    else
                    {
                        destination_13.Add(new ToolComponent(value_14));
                    }
                }

                Policies = destination_13;
            }

            if (webRequests != null)
            {
                var destination_14 = new List <WebRequest>();
                foreach (var value_15 in webRequests)
                {
                    if (value_15 == null)
                    {
                        destination_14.Add(null);
                    }
                    else
                    {
                        destination_14.Add(new WebRequest(value_15));
                    }
                }

                WebRequests = destination_14;
            }

            if (webResponses != null)
            {
                var destination_15 = new List <WebResponse>();
                foreach (var value_16 in webResponses)
                {
                    if (value_16 == null)
                    {
                        destination_15.Add(null);
                    }
                    else
                    {
                        destination_15.Add(new WebResponse(value_16));
                    }
                }

                WebResponses = destination_15;
            }

            if (specialLocations != null)
            {
                SpecialLocations = new SpecialLocations(specialLocations);
            }

            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
Exemple #3
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="language">
 /// An initialization value for the <see cref="P:Language" /> 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="automationDetails">
 /// An initialization value for the <see cref="P:AutomationDetails" /> property.
 /// </param>
 /// <param name="runAggregates">
 /// An initialization value for the <see cref="P:RunAggregates" /> property.
 /// </param>
 /// <param name="baselineGuid">
 /// An initialization value for the <see cref="P:BaselineGuid" /> property.
 /// </param>
 /// <param name="redactionTokens">
 /// An initialization value for the <see cref="P:RedactionTokens" /> property.
 /// </param>
 /// <param name="defaultEncoding">
 /// An initialization value for the <see cref="P:DefaultEncoding" /> 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="externalPropertyFileReferences">
 /// An initialization value for the <see cref="P:ExternalPropertyFileReferences" /> property.
 /// </param>
 /// <param name="threadFlowLocations">
 /// An initialization value for the <see cref="P:ThreadFlowLocations" /> property.
 /// </param>
 /// <param name="taxonomies">
 /// An initialization value for the <see cref="P:Taxonomies" /> property.
 /// </param>
 /// <param name="addresses">
 /// An initialization value for the <see cref="P:Addresses" /> property.
 /// </param>
 /// <param name="translations">
 /// An initialization value for the <see cref="P:Translations" /> property.
 /// </param>
 /// <param name="policies">
 /// An initialization value for the <see cref="P:Policies" /> property.
 /// </param>
 /// <param name="webRequests">
 /// An initialization value for the <see cref="P:WebRequests" /> property.
 /// </param>
 /// <param name="webResponses">
 /// An initialization value for the <see cref="P:WebResponses" /> property.
 /// </param>
 /// <param name="specialLocations">
 /// An initialization value for the <see cref="P:SpecialLocations" /> 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, string language, IEnumerable <VersionControlDetails> versionControlProvenance, IDictionary <string, ArtifactLocation> originalUriBaseIds, IEnumerable <Artifact> artifacts, IEnumerable <LogicalLocation> logicalLocations, IEnumerable <Graph> graphs, IEnumerable <Result> results, RunAutomationDetails automationDetails, IEnumerable <RunAutomationDetails> runAggregates, string baselineGuid, IEnumerable <string> redactionTokens, string defaultEncoding, string defaultSourceLanguage, IEnumerable <string> newlineSequences, ColumnKind columnKind, ExternalPropertyFileReferences externalPropertyFileReferences, IEnumerable <ThreadFlowLocation> threadFlowLocations, IEnumerable <ToolComponent> taxonomies, IEnumerable <Address> addresses, IEnumerable <ToolComponent> translations, IEnumerable <ToolComponent> policies, IEnumerable <WebRequest> webRequests, IEnumerable <WebResponse> webResponses, SpecialLocations specialLocations, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(tool, invocations, conversion, language, versionControlProvenance, originalUriBaseIds, artifacts, logicalLocations, graphs, results, automationDetails, runAggregates, baselineGuid, redactionTokens, defaultEncoding, defaultSourceLanguage, newlineSequences, columnKind, externalPropertyFileReferences, threadFlowLocations, taxonomies, addresses, translations, policies, webRequests, webResponses, specialLocations, properties);
 }
Exemple #4
0
 public bool ValueEquals(SpecialLocations other) => ValueComparer.Equals(this, other);