示例#1
0
        // This is an Async method
        protected virtual void GetExercise(BackgroundWorker worker)
        {
            Exercise exercise = ObjectCreator.CreateExercise(this.exerciseTitle, this.exerciseDescription);

            foreach (SectionBaseInfo info in this.sectionInfoCollection)
            {
                if (info.QuestionCount == 0)
                {
                    continue;
                }

                exercise.SectionCollection.Add(this.CreateSection(info, worker));
            }

            worker.ReportProgress(100, exercise);
        }