/// <summary>
 /// Crate a copy of the output params with the option to override the resultDef
 /// All lists will be initialized.
 /// </summary>
 /// <param name="source"></param>
 /// <param name="resultDef"></param>
 public ServiceParamsValidated(ServiceParamsValidated source, ResultDef resultDef = null)
 {
     PageType = source.PageType;
     ProductList = source.ProductList == null || source.ProductList.Count < 1 ? new List<string>() : new List<string>(source.ProductList);
     Att1List = source.Att1List == null || source.Att1List.Count < 1 ? new List<string>() : new List<string>(source.Att1List);
     CartList = source.CartList == null || source.CartList.Count < 1 ? new List<string>() : new List<string>(source.CartList);
     ClickList = source.ClickList == null || source.ClickList.Count < 1 ? new List<string>() : new List<string>(source.ClickList);
     UserList = source.UserList == null || source.UserList.Count < 1 ? new List<string>() : new List<string>(source.UserList);
     BlockList = source.BlockList == null || source.BlockList.Count < 1 ? new List<string>() : new List<string>(source.BlockList);
     ProductIndex = source.ProductIndex == null || source.ProductIndex.Count < 1 ? new List<int>() : new List<int>(source.ProductIndex);
     Att1Index = source.Att1Index == null || source.Att1Index.Count < 1 ? new List<int>() : new List<int>(source.Att1Index);
     CartIndex = source.CartIndex == null || source.CartIndex.Count < 1 ? new List<int>() : new List<int>(source.CartIndex);
     ClickIndex = source.ClickIndex == null || source.ClickIndex.Count < 1 ? new List<int>() : new List<int>(source.ClickIndex);
     UserIndex = source.UserIndex == null || source.UserIndex.Count < 1 ? new List<int>() : new List<int>(source.UserIndex);
     ResultDef = resultDef != null ? new ResultDef(resultDef) :
         source.ResultDef != null ? new ResultDef(source.ResultDef) :
         new ResultDef();
 }
 public ResultDef(ResultDef source)
 {
     ResultType = source.ResultType;
     RecipeFillMode = source.RecipeFillMode;
     NumResults = source.NumResults;
     StartPos = source.StartPos > 0 ? source.StartPos : 1;
     TotalResults = StartPos + NumResults - 1;
     Block = source.Block;
 }
 /// <summary>
 /// Initialize a set of output params with the resultDef and pageType. 
 /// All lists will be initialized.
 /// </summary>
 /// <param name="resultDef"></param>
 /// <param name="pageType"></param>
 public ServiceParamsValidated(ResultDef resultDef, ClickRecord.pageType pageType)
 {
     ResultDef = resultDef != null ? new ResultDef(resultDef) : new ResultDef();
     PageType = pageType;
     ProductList = new List<string>();
     Att1List = new List<string>();
     CartList = new List<string>();
     ClickList = new List<string>();
     UserList = new List<string>();
     BlockList = new List<string>();
     ProductIndex = new List<int>();
     Att1Index = new List<int>();
     CartIndex = new List<int>();
     ClickIndex = new List<int>();
     UserIndex = new List<int>();
 }