Example #1
0
        public IEnumerable <Engineer> Select(SupportScheduleSpecification supportScheduleSpecification)
        {
            var scheduleDate      = supportScheduleSpecification.Date;
            var supportCandidates = _engineerRepository.List();

            if (supportScheduleSpecification.RequireDayOffBetweenDaysWithShifts)
            {
                supportCandidates = _dayOffFilter.Filter(supportCandidates, scheduleDate);
            }

            supportCandidates = _shiftAvailabilityReconciler.Reconcile(
                supportCandidates,
                scheduleDate,
                supportScheduleSpecification.RequireSingleShiftPerEngineerPerDay,
                supportScheduleSpecification.RequireTwoShiftsInTwoWeeks);

            return(supportCandidates.ToList());
        }