public static ScheduleService Create(TypiconDBContext dbContext)
        {
            IRuleSerializerRoot serializerRoot = TestRuleSerializer.Create(dbContext);

            var settingsFactory = new RuleHandlerSettingsFactory(serializerRoot);

            var commandProcessor = CommandProcessorFactory.Create(dbContext);
            var queryProcessor   = DataQueryProcessorFactory.Create(dbContext);

            return(new ScheduleService(new ScheduleDataCalculator(queryProcessor, settingsFactory)
                                       , new ScheduleDayNameComposer(serializerRoot.QueryProcessor)));
        }
Exemple #2
0
        public static OutputForms Create(TypiconDBContext dbContext)
        {
            var serializerRoot = TestRuleSerializer.Create(dbContext);

            var settingsFactory = new RuleHandlerSettingsFactory(serializerRoot);

            var commandProcessor = CommandProcessorFactory.Create(dbContext);

            var nameComposer = new ScheduleDayNameComposer(serializerRoot.QueryProcessor);

            var outputFormFactory = new OutputDayFactory(new ScheduleDataCalculator(serializerRoot.QueryProcessor, settingsFactory)
                                                         , nameComposer
                                                         , serializerRoot.TypiconSerializer
                                                         , new ServiceSequenceHandler());

            return(new OutputForms(dbContext
                                   , new ScheduleDayNameComposer(serializerRoot.QueryProcessor)
                                   , serializerRoot.TypiconSerializer
                                   , new JobRepository()));
        }