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

            Init(other.Tool, other.Invocation, other.Files, other.LogicalLocations, other.Results, other.ToolNotifications, other.ConfigurationNotifications, other.Rules, other.Id, other.StableId, other.AutomationId, other.BaselineId, other.Architecture, other.Properties);
        }
        public virtual RunVersionOne VisitRunVersionOne(RunVersionOne node)
        {
            if (node != null)
            {
                node.Tool       = VisitNullChecked(node.Tool);
                node.Invocation = VisitNullChecked(node.Invocation);
                if (node.Files != null)
                {
                    var keys = node.Files.Keys.ToArray();
                    foreach (var key in keys)
                    {
                        var value = node.Files[key];
                        if (value != null)
                        {
                            node.Files[key] = VisitNullChecked(value);
                        }
                    }
                }

                if (node.LogicalLocations != null)
                {
                    var keys = node.LogicalLocations.Keys.ToArray();
                    foreach (var key in keys)
                    {
                        var value = node.LogicalLocations[key];
                        if (value != null)
                        {
                            node.LogicalLocations[key] = VisitNullChecked(value);
                        }
                    }
                }

                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]);
                    }
                }

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

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

                if (node.Rules != null)
                {
                    var keys = node.Rules.Keys.ToArray();
                    foreach (var key in keys)
                    {
                        var value = node.Rules[key];
                        if (value != null)
                        {
                            node.Rules[key] = VisitNullChecked(value);
                        }
                    }
                }
            }

            return(node);
        }
Beispiel #3
0
 public bool ValueEquals(RunVersionOne other) => ValueComparer.Equals(this, other);