예제 #1
0
 /// <summary>
 /// Creates a deep copy of <see cref="IdentificationModel"/> instance
 /// </summary>
 /// <returns>Deep copy of self</returns>
 public object Clone()
 {
     return(new IdentificationModel()
     {
         IdentificationExperiments = (IdentificationExperimentCollection)IdentificationExperiments.Clone(),
         RealExperiments = (ExperimentCollection)RealExperiments.Clone(),
         IdentificationParameters = (ParameterCollection)IdentificationParameters.Clone(),
         OptimizationParameters = (ParameterCollection)OptimizationParameters.Clone(),
         Criteria = (CriterionCollection)Criteria.Clone(),
         FunctionalConstraints = (ConstraintCollection)FunctionalConstraints.Clone(),
         Properties = (PropertyCollection)Properties.Clone()
     });
 }
        public object Clone()
        {
            var clone = (BrowsingByCategoryParam)(MemberwiseClone());

            if (Criteria != null)
            {
                clone.Criteria = Criteria.Clone();
            }

            clone.CategoryName         = CategoryName;
            clone.IsAllProducts        = IsAllProducts;
            clone.InventoryLocationIds = new List <string>(InventoryLocationIds);

            return(clone);
        }
예제 #3
0
        public object Clone()
        {
            var clone = new BrowsingSearchParam
            {
                CategoryId = CategoryId
            };

            if (Criteria != null)
            {
                clone.Criteria = Criteria.Clone();
            }
            if (CategoryFilters != null)
            {
                clone.CategoryFilters = CategoryFilters.Select(cf => cf.Clone()).ToList();
            }

            clone.IsAllProductsPage = IsAllProductsPage;
            return(clone);
        }