Beispiel #1
0
        public GDEtaskBagData DeepClone()
        {
            GDEtaskBagData newClone = ShallowClone();

            newClone.allTasks = new List <GDEtimeTaskData>();
            if (allTasks != null)
            {
                foreach (var val in allTasks)
                {
                    newClone.allTasks.Add(val.DeepClone());
                }
            }
            newClone.Set_allTasks();
            return(newClone);
        }
Beispiel #2
0
        public GDEtaskBagData ShallowClone()
        {
            string         newKey   = Guid.NewGuid().ToString();
            GDEtaskBagData newClone = new GDEtaskBagData(newKey);

            newClone.taskBagType  = taskBagType;
            newClone.taskBagId    = taskBagId;
            newClone.step         = step;
            newClone.taskBagClass = taskBagClass;

            newClone.allTasks = new List <GDEtimeTaskData>(allTasks);
            newClone.Set_allTasks();

            return(newClone);
        }