Пример #1
0
        public static PricingValueDriverGroup Copy(this PricingValueDriverGroup source)
        {
            var copy = new PricingValueDriverGroup();

            copy.SalesValue = source.SalesValue;
            copy.Id         = source.Id;
            copy.Value      = source.Value;
            copy.MinOutlier = source.MinOutlier;
            copy.MaxOutlier = source.MaxOutlier;
            copy.Sort       = source.Sort;

            return(copy);
        }
Пример #2
0
        /// <summary>
        /// Creates a copy of an <see cref="PricingEverydayValueDriver"/>.
        /// </summary>
        public static PricingEverydayValueDriver Copy(this PricingEverydayValueDriver source)
        {
            var copy = new PricingEverydayValueDriver();

            copy.Id         = source.Id;
            copy.Key        = source.Key;
            copy.IsSelected = source.IsSelected;
            copy.Name       = source.Name;
            copy.Sort       = source.Sort;
            copy.Title      = source.Title;

            foreach (PricingValueDriverGroup group in source.Groups)
            {
                PricingValueDriverGroup groupCopy = group.Copy();
                copy.Groups.Add(groupCopy);
            }

            return(copy);
        }