コード例 #1
0
        public virtual ToolVersionOne VisitToolVersionOne(ToolVersionOne node)
        {
            if (node != null)
            {
            }

            return(node);
        }
コード例 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="ToolVersionOne" /> 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 ToolVersionOne(ToolVersionOne other)
        {
            if (other == null)
            {
                throw new ArgumentNullException(nameof(other));
            }

            Init(other.Name, other.FullName, other.Version, other.SemanticVersion, other.FileVersion, other.SarifLoggerVersion, other.Language, other.Properties);
        }
コード例 #3
0
 public bool ValueEquals(ToolVersionOne other) => ValueComparer.Equals(this, other);
コード例 #4
0
ファイル: RunVersionOne.cs プロジェクト: tosmolka/sarif-sdk
        private void Init(ToolVersionOne tool, InvocationVersionOne invocation, IDictionary <string, FileDataVersionOne> files, IDictionary <string, LogicalLocationVersionOne> logicalLocations, IEnumerable <ResultVersionOne> results, IEnumerable <NotificationVersionOne> toolNotifications, IEnumerable <NotificationVersionOne> configurationNotifications, IDictionary <string, RuleVersionOne> rules, string id, string stableId, string automationId, string baselineId, string architecture, IDictionary <string, SerializedPropertyInfo> properties)
        {
            if (tool != null)
            {
                Tool = new ToolVersionOne(tool);
            }

            if (invocation != null)
            {
                Invocation = new InvocationVersionOne(invocation);
            }

            if (files != null)
            {
                Files = new Dictionary <string, FileDataVersionOne>();
                foreach (var value_0 in files)
                {
                    Files.Add(value_0.Key, new FileDataVersionOne(value_0.Value));
                }
            }

            if (logicalLocations != null)
            {
                LogicalLocations = new Dictionary <string, LogicalLocationVersionOne>();
                foreach (var value_1 in logicalLocations)
                {
                    LogicalLocations.Add(value_1.Key, new LogicalLocationVersionOne(value_1.Value));
                }
            }

            if (results != null)
            {
                var destination_0 = new List <ResultVersionOne>();
                foreach (var value_2 in results)
                {
                    if (value_2 == null)
                    {
                        destination_0.Add(null);
                    }
                    else
                    {
                        destination_0.Add(new ResultVersionOne(value_2));
                    }
                }

                Results = destination_0;
            }

            if (toolNotifications != null)
            {
                var destination_1 = new List <NotificationVersionOne>();
                foreach (var value_3 in toolNotifications)
                {
                    if (value_3 == null)
                    {
                        destination_1.Add(null);
                    }
                    else
                    {
                        destination_1.Add(new NotificationVersionOne(value_3));
                    }
                }

                ToolNotifications = destination_1;
            }

            if (configurationNotifications != null)
            {
                var destination_2 = new List <NotificationVersionOne>();
                foreach (var value_4 in configurationNotifications)
                {
                    if (value_4 == null)
                    {
                        destination_2.Add(null);
                    }
                    else
                    {
                        destination_2.Add(new NotificationVersionOne(value_4));
                    }
                }

                ConfigurationNotifications = destination_2;
            }

            if (rules != null)
            {
                Rules = new Dictionary <string, RuleVersionOne>();
                foreach (var value_5 in rules)
                {
                    Rules.Add(value_5.Key, new RuleVersionOne(value_5.Value));
                }
            }

            Id           = id;
            StableId     = stableId;
            AutomationId = automationId;
            BaselineId   = baselineId;
            Architecture = architecture;
            if (properties != null)
            {
                Properties = new Dictionary <string, SerializedPropertyInfo>(properties);
            }
        }
コード例 #5
0
ファイル: RunVersionOne.cs プロジェクト: tosmolka/sarif-sdk
 /// <summary>
 /// Initializes a new instance of the <see cref="RunVersionOne" /> class from the supplied values.
 /// </summary>
 /// <param name="tool">
 /// An initialization value for the <see cref="P: Tool" /> property.
 /// </param>
 /// <param name="invocation">
 /// An initialization value for the <see cref="P: Invocation" /> property.
 /// </param>
 /// <param name="files">
 /// An initialization value for the <see cref="P: Files" /> property.
 /// </param>
 /// <param name="logicalLocations">
 /// An initialization value for the <see cref="P: LogicalLocations" /> property.
 /// </param>
 /// <param name="results">
 /// An initialization value for the <see cref="P: Results" /> property.
 /// </param>
 /// <param name="toolNotifications">
 /// An initialization value for the <see cref="P: ToolNotifications" /> property.
 /// </param>
 /// <param name="configurationNotifications">
 /// An initialization value for the <see cref="P: ConfigurationNotifications" /> property.
 /// </param>
 /// <param name="rules">
 /// An initialization value for the <see cref="P: Rules" /> property.
 /// </param>
 /// <param name="id">
 /// An initialization value for the <see cref="P: Id" /> property.
 /// </param>
 /// <param name="stableId">
 /// An initialization value for the <see cref="P: StableId" /> property.
 /// </param>
 /// <param name="automationId">
 /// An initialization value for the <see cref="P: AutomationId" /> property.
 /// </param>
 /// <param name="baselineId">
 /// An initialization value for the <see cref="P: BaselineId" /> property.
 /// </param>
 /// <param name="architecture">
 /// An initialization value for the <see cref="P: Architecture" /> property.
 /// </param>
 /// <param name="properties">
 /// An initialization value for the <see cref="P: Properties" /> property.
 /// </param>
 public RunVersionOne(ToolVersionOne tool, InvocationVersionOne invocation, IDictionary <string, FileDataVersionOne> files, IDictionary <string, LogicalLocationVersionOne> logicalLocations, IEnumerable <ResultVersionOne> results, IEnumerable <NotificationVersionOne> toolNotifications, IEnumerable <NotificationVersionOne> configurationNotifications, IDictionary <string, RuleVersionOne> rules, string id, string stableId, string automationId, string baselineId, string architecture, IDictionary <string, SerializedPropertyInfo> properties)
 {
     Init(tool, invocation, files, logicalLocations, results, toolNotifications, configurationNotifications, rules, id, stableId, automationId, baselineId, architecture, properties);
 }