/// <summary>
        /// Deep copies the current DojoSeminarReservation to another instance of DojoSeminarReservation.
        /// </summary>
        /// <param name="DojoSeminarReservation">The DojoSeminarReservation to copy to.</param>
        /// <param name="isolation">Placeholders are used to isolate the DojoSeminarReservation from its children.</param>
        public void CopyTo(DojoSeminarReservation dojoSeminarReservation, bool isolation)
        {
            dojoSeminarReservation.iD                      = iD;
            dojoSeminarReservation.isPlaceHolder           = isPlaceHolder;
            dojoSeminarReservation.isSynced                = isSynced;
            dojoSeminarReservation.isBlockReservation      = isBlockReservation;
            dojoSeminarReservation.checkIn                 = checkIn;
            dojoSeminarReservation.checkOut                = checkOut;
            dojoSeminarReservation.isClassReservation      = isClassReservation;
            dojoSeminarReservation.isDefinitionReservation = isDefinitionReservation;

            if (registration != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.registration = registration.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.registration = registration.Copy(false);
                }
            }
            if (parentReservation != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.parentReservation = parentReservation.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.parentReservation = parentReservation.Copy(false);
                }
            }
            if (class1 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.class1 = class1.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.class1 = class1.Copy(false);
                }
            }
            if (class2 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.class2 = class2.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.class2 = class2.Copy(false);
                }
            }
            if (class3 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.class3 = class3.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.class3 = class3.Copy(false);
                }
            }
            if (class4 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.class4 = class4.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.class4 = class4.Copy(false);
                }
            }
            if (class5 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.class5 = class5.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.class5 = class5.Copy(false);
                }
            }
            if (class6 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.class6 = class6.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.class6 = class6.Copy(false);
                }
            }
            if (class7 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.class7 = class7.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.class7 = class7.Copy(false);
                }
            }
            if (class8 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.class8 = class8.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.class8 = class8.Copy(false);
                }
            }
            if (class9 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.class9 = class9.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.class9 = class9.Copy(false);
                }
            }
            if (class10 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.class10 = class10.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.class10 = class10.Copy(false);
                }
            }
            if (definition1 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.definition1 = definition1.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.definition1 = definition1.Copy(false);
                }
            }
            if (definition2 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.definition2 = definition2.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.definition2 = definition2.Copy(false);
                }
            }
            if (definition3 != null)
            {
                if (isolation)
                {
                    dojoSeminarReservation.definition3 = definition3.NewPlaceHolder();
                }
                else
                {
                    dojoSeminarReservation.definition3 = definition3.Copy(false);
                }
            }
        }
Example #2
0
 /// <summary>
 /// Deep copies the current DojoClass to another instance of DojoClass.
 /// </summary>
 /// <param name="DojoClass">The DojoClass to copy to.</param>
 /// <param name="isolation">Placeholders are used to isolate the DojoClass from its children.</param>
 public void CopyTo(DojoClass dojoClass, bool isolation)
 {
     dojoClass.iD            = iD;
     dojoClass.isPlaceHolder = isPlaceHolder;
     dojoClass.isSynced      = isSynced;
     dojoClass.name          = name;
     if (instructor != null)
     {
         if (isolation)
         {
             dojoClass.instructor = instructor.NewPlaceHolder();
         }
         else
         {
             dojoClass.instructor = instructor.Copy(false);
         }
     }
     if (parentSeminar != null)
     {
         if (isolation)
         {
             dojoClass.parentSeminar = parentSeminar.NewPlaceHolder();
         }
         else
         {
             dojoClass.parentSeminar = parentSeminar.Copy(false);
         }
     }
     if (parentDefinition != null)
     {
         if (isolation)
         {
             dojoClass.parentDefinition = parentDefinition.NewPlaceHolder();
         }
         else
         {
             dojoClass.parentDefinition = parentDefinition.Copy(false);
         }
     }
     if (location != null)
     {
         if (isolation)
         {
             dojoClass.location = location.NewPlaceHolder();
         }
         else
         {
             dojoClass.location = location.Copy(false);
         }
     }
     if (accessControlGroup != null)
     {
         if (isolation)
         {
             dojoClass.accessControlGroup = accessControlGroup.NewPlaceHolder();
         }
         else
         {
             dojoClass.accessControlGroup = accessControlGroup.Copy(false);
         }
     }
     dojoClass.occupancyMax       = occupancyMax;
     dojoClass.occupancyTarget    = occupancyTarget;
     dojoClass.occupancyCurrent   = occupancyCurrent;
     dojoClass.occupancyCheckDate = occupancyCheckDate;
     dojoClass.signinStart        = signinStart;
     dojoClass.signinEnd          = signinEnd;
     dojoClass.classStart         = classStart;
     dojoClass.classEnd           = classEnd;
 }