예제 #1
0
        public static TrainingPlanPack Create(TrainingPlan plan, IDictionary <Guid, ExerciseDTO> exercises)
        {
            if (plan == null)
            {
                throw new ArgumentNullException("plan");
            }
            TrainingPlanPack pack = new TrainingPlanPack();

            pack.TrainingPlan = plan;
            foreach (var day in pack.TrainingPlan.Days)
            {
                foreach (var entry in day.Entries)
                {
                    if (exercises.ContainsKey(entry.ExerciseId) && !pack.Exercises.Contains(entry.ExerciseId))
                    {
                        pack.Exercises.Add(entry.ExerciseId);
                    }
                }
            }
            return(pack);
        }
예제 #2
0
 public SplitPlanChecker(TrainingPlanPack pack)
 {
     this.pack = pack;
 }