private static void MigrateSeparated()
        {
            using (
                _session =
                    new TimeTableSession
            {
                ConnectionString = Configuration.GetConnectionStringByName(ConnectionStringName)
            })
            {
                var divisions = GetDivisions(_session);
                foreach (var division in divisions)
                {
                    foreach (var studyYear in GetStudyYears(_session))
                    {
                        var contingentUnitsCriteria = CriteriaOperator.And(
                            new BinaryOperator("Division", division),
                            new BinaryOperator("CurrentStudyYear", studyYear));
                        var contingentUnits       = new XPCollection <ContingentUnit>(_session, contingentUnitsCriteria);
                        var patternsAndExceptions = GetPatternsAndExceptions(contingentUnits);
                        using (var appointmentsRepository = new BasicTimeEventAppointmentsRepository(new CommonEventSchedulerStorageInitializer(patternsAndExceptions), new DateTime(2000, 1, 1), new DateTime(2020, 1, 1)))
                        {
                            var appts = appointmentsRepository.GetAppointments();

                            var eventCreator = new NormalEventCreator(appointmentsRepository.SchedulerStorage);

                            Boom(appts, eventCreator, appointmentsRepository.SchedulerStorage);
                        }
                    }
                }
            }
        }
        private void ProcessWholePattern(Event patternEvnt, IEnumerable <Event> patternExceptionEvents)
        {
            var wholePattern = patternExceptionEvents.ToList();

            wholePattern.Add(patternEvnt);

            using (var appointmentsRepository = new BasicTimeEventAppointmentsRepository(new CommonEventSchedulerStorageInitializer(wholePattern)))
            {
                var appts = appointmentsRepository.GetAppointments();

                var eventCreator = new EventCreator(appointmentsRepository.SchedulerStorage);

                Boom(appts, patternEvnt, eventCreator, patternExceptionEvents);
            }
        }