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); }
public SplitPlanChecker(TrainingPlanPack pack) { this.pack = pack; }