public CustomSequenceController(IQueryProcessor queryProcessor, OutputDayFactory outputFormFactory
                                 , CustomScheduleDataCalculator dataCalculator)
 {
     _queryProcessor    = queryProcessor ?? throw new ArgumentNullException(nameof(queryProcessor));
     _outputFormFactory = outputFormFactory ?? throw new ArgumentNullException(nameof(outputFormFactory));
     _dataCalculator    = dataCalculator ?? throw new ArgumentNullException(nameof(dataCalculator));
 }
Exemplo n.º 2
0
        public static CalculateOutputFormWeekJobHandler Build(TypiconDBContext dbContext, JobRepository jobRepo)
        {
            var query = DataQueryProcessorFactory.Create(dbContext);

            var serializerRoot = TestRuleSerializer.Create(dbContext);

            var settingsFactory = new RuleHandlerSettingsFactory(serializerRoot);

            var outputFormFactory = new OutputDayFactory(new MajorDataCalculator(query, settingsFactory)
                                                         , new ScheduleDayNameComposer(query)
                                                         , serializerRoot.TypiconSerializer
                                                         , new ServiceSequenceHandler());

            return(new CalculateOutputFormWeekJobHandler(dbContext, outputFormFactory, jobRepo));
        }
Exemplo n.º 3
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()));
        }