示例#1
0
        /// <summary>
        /// <c>ICloneable</c> implementation. Returns a shallow copy of the object.
        /// </summary>
        public object Clone()
        {
            RunnerCustomization cust = new RunnerCustomization();

            cust._file     = File;
            cust._filename = FileName;
            cust._order    = RunOrder;
            return(cust);
        }
示例#2
0
        /// <summary>
        /// Loads customization elements to the passed <c>SortedList</c>
        /// </summary>
        /// <param name="nodes">The customization nodes.</param>
        /// <param name="customizations">The collection to add elements to.</param>
        private void ProcessCustomizations(XmlNodeList nodes, SortedList customizations)
        {
            RunnerCustomization row;
            XmlAttribute        attr;

            foreach (XmlNode node in nodes)
            {
                attr = node.Attributes["runOrder"];
                int order = -1;
                if (attr != null)
                {
                    order = int.Parse(attr.Value);
                }
                if (order == -1)
                {
                    order = int.MaxValue;
                }
                row = new RunnerCustomization(node.Attributes["file"].Value, order);
                customizations.Add(new SortedDuplicateKey(order), row);
            }
        }