Exemple #1
0
        private bool CalculateSetup_EmptyKindOfClassActivities
        (
            ImmutableListEnumerator <Course> courses,
            CourseGroup group,
            ImmutableListEnumerator <ClassActivitiesInfo> classActivitiesOfKindEnumerator,
            ClassActivitiesInfo classActivitiesOfKind)
        {
            if (!classActivitiesOfKind.CanBeEmpty)
            {
                throw new InvalidScheduleException("The class activities cannot be empty");
            }

            return(CalculateSetup_NextClassActivity(courses, group, classActivitiesOfKindEnumerator, null));
        }
Exemple #2
0
        private bool CalculateSetup_ClassActivitiesOfKind
        (
            ImmutableListEnumerator <Course> courses,
            CourseGroup group,
            ImmutableListEnumerator <ClassActivitiesInfo> classActivitiesOfKindEnumerator,
            ClassActivitiesInfo classActivitiesOfKind
        )
        {
            bool atLeastOne = false;

            foreach (IClassActivity classActivity in classActivitiesOfKind)
            {
                bool successs = CalculateSetup_NextClassActivity(courses, group, classActivitiesOfKindEnumerator, classActivity);
                if (successs)
                {
                    atLeastOne = true;
                }
            }

            return(atLeastOne);
        }
Exemple #3
0
        private bool CalculateSetup_NextKindOfClassActivities
        (
            ImmutableListEnumerator <Course> courses,
            CourseGroup group,
            ImmutableListEnumerator <ClassActivitiesInfo> classActivitiesOfKindEnumerator
        )
        {
            classActivitiesOfKindEnumerator = classActivitiesOfKindEnumerator.MoveNext();
            if (classActivitiesOfKindEnumerator.HasEnded)
            {
                return(CalculateSetup_BuildCoursePlacement(courses, group));
            }

            ClassActivitiesInfo classActivitiesOfKind = classActivitiesOfKindEnumerator.Current;

            if (classActivitiesOfKind.IsEmpty())
            {
                return(CalculateSetup_EmptyKindOfClassActivities(courses, group, classActivitiesOfKindEnumerator, classActivitiesOfKind));
            }

            return(CalculateSetup_ClassActivitiesOfKind(courses, group, classActivitiesOfKindEnumerator, classActivitiesOfKind));
        }
Exemple #4
0
 private void BuildPraticeClassesForCourse(Course course)
 {
     PraticeClasses[course] = new ClassActivitiesInfo(GetAllPracticeClassesOfCourse(course), true);
 }