Example #1
0
 public CleanUpService(ITasklingConfiguration tasklingConfiguration,
                       ICleanUpRepository cleanUpRepository,
                       ITaskExecutionRepository taskExecutionRepository)
 {
     _cleanUpRepository       = cleanUpRepository;
     _tasklingConfiguration   = tasklingConfiguration;
     _taskExecutionRepository = taskExecutionRepository;
 }
 public ExecuteBatchCommandHandler(
     ILogger <FunctionalObjectCommandsHandler> logger,
     IUnitOfWork unitOfWork,
     ICleanUpRepository cleanUpRepository,
     IBatchGroupRepository batchGroupRepository,
     AtlasService atlasService)
 {
     _cleanUpRepository    = cleanUpRepository ?? throw new ArgumentNullException(nameof(cleanUpRepository));
     _batchGroupRepository = batchGroupRepository ?? throw new ArgumentNullException(nameof(batchGroupRepository));
     _unitOfWork           = unitOfWork ?? throw new ArgumentNullException(nameof(unitOfWork));
     _logger       = logger ?? throw new ArgumentNullException(nameof(logger));
     _atlasService = atlasService ?? throw new ArgumentNullException(nameof(atlasService));
 }
 public CleanUpService(ITasklingConfiguration tasklingConfiguration, ICleanUpRepository cleanUpRepository)
 {
     _cleanUpRepository = cleanUpRepository;
     _tasklingConfiguration = tasklingConfiguration;
 }
Example #4
0
        public TasklingClient(IConfigurationReader configurationReader,
                              ITaskRepository taskRepository                       = null,
                              ITasklingConfiguration configuration                 = null,
                              ITaskExecutionRepository taskExecutionRepository     = null,
                              IExecutionTokenRepository executionTokenRepository   = null,
                              ICommonTokenRepository commonTokenRepository         = null,
                              IEventsRepository eventsRepository                   = null,
                              ICriticalSectionRepository criticalSectionRepository = null,
                              IBlockFactory blockFactory                   = null,
                              IBlockRepository blockRepository             = null,
                              IRangeBlockRepository rangeBlockRepository   = null,
                              IListBlockRepository listBlockRepository     = null,
                              IObjectBlockRepository objectBlockRepository = null,
                              ICleanUpService cleanUpService               = null,
                              ICleanUpRepository cleanUpRepository         = null)
        {
            if (taskRepository == null)
            {
                taskRepository = new TaskRepository();
            }

            if (configuration == null)
            {
                _configuration = new TasklingConfiguration(configurationReader);
            }

            if (commonTokenRepository == null)
            {
                commonTokenRepository = new CommonTokenRepository();
            }

            if (executionTokenRepository == null)
            {
                executionTokenRepository = new ExecutionTokenRepository(commonTokenRepository);
            }

            if (eventsRepository == null)
            {
                eventsRepository = new EventsRepository();
            }

            if (taskExecutionRepository != null)
            {
                _taskExecutionRepository = taskExecutionRepository;
            }
            else
            {
                _taskExecutionRepository = new TaskExecutionRepository(taskRepository, executionTokenRepository, eventsRepository);
            }

            if (criticalSectionRepository != null)
            {
                _criticalSectionRepository = criticalSectionRepository;
            }
            else
            {
                _criticalSectionRepository = new CriticalSectionRepository(taskRepository, commonTokenRepository);
            }

            if (blockRepository == null)
            {
                blockRepository = new BlockRepository(taskRepository);
            }

            if (rangeBlockRepository != null)
            {
                _rangeBlockRepository = rangeBlockRepository;
            }
            else
            {
                _rangeBlockRepository = new RangeBlockRepository(taskRepository);
            }

            if (listBlockRepository != null)
            {
                _listBlockRepository = listBlockRepository;
            }
            else
            {
                _listBlockRepository = new ListBlockRepository(taskRepository);
            }

            if (objectBlockRepository != null)
            {
                _objectBlockRepository = objectBlockRepository;
            }
            else
            {
                _objectBlockRepository = new ObjectBlockRepository(taskRepository);
            }

            if (blockFactory != null)
            {
                _blockFactory = blockFactory;
            }
            else
            {
                _blockFactory = new BlockFactory(blockRepository, _rangeBlockRepository, _listBlockRepository, _objectBlockRepository, _taskExecutionRepository);
            }

            if (cleanUpRepository == null)
            {
                cleanUpRepository = new CleanUpRepository(taskRepository);
            }

            if (cleanUpService != null)
            {
                _cleanUpService = cleanUpService;
            }
            else
            {
                _cleanUpService = new CleanUpService(_configuration, cleanUpRepository);
            }
        }
        public TasklingClient(IConfigurationReader configurationReader,
            ITaskRepository taskRepository = null,
            ITasklingConfiguration configuration = null,
            ITaskExecutionRepository taskExecutionRepository = null,
            IExecutionTokenRepository executionTokenRepository = null,
            ICommonTokenRepository commonTokenRepository = null,
            IEventsRepository eventsRepository = null,
            ICriticalSectionRepository criticalSectionRepository = null,
            IBlockFactory blockFactory = null,
            IBlockRepository blockRepository = null,
            IRangeBlockRepository rangeBlockRepository = null,
            IListBlockRepository listBlockRepository = null,
            IObjectBlockRepository objectBlockRepository = null,
            ICleanUpService cleanUpService = null,
            ICleanUpRepository cleanUpRepository = null)
        {
            if (taskRepository == null)
                taskRepository = new TaskRepository();

            if (configuration == null)
                _configuration = new TasklingConfiguration(configurationReader);

            if (commonTokenRepository == null)
                commonTokenRepository = new CommonTokenRepository();

            if (executionTokenRepository == null)
                executionTokenRepository = new ExecutionTokenRepository(commonTokenRepository);

            if (eventsRepository == null)
                eventsRepository = new EventsRepository();

            if (taskExecutionRepository != null)
                _taskExecutionRepository = taskExecutionRepository;
            else
                _taskExecutionRepository = new TaskExecutionRepository(taskRepository, executionTokenRepository, eventsRepository);

            if (criticalSectionRepository != null)
                _criticalSectionRepository = criticalSectionRepository;
            else
                _criticalSectionRepository = new CriticalSectionRepository(taskRepository, commonTokenRepository);

            if (blockRepository == null)
                blockRepository = new BlockRepository(taskRepository);

            if (rangeBlockRepository != null)
                _rangeBlockRepository = rangeBlockRepository;
            else
                _rangeBlockRepository = new RangeBlockRepository(taskRepository);

            if (listBlockRepository != null)
                _listBlockRepository = listBlockRepository;
            else
                _listBlockRepository = new ListBlockRepository(taskRepository);

            if (objectBlockRepository != null)
                _objectBlockRepository = objectBlockRepository;
            else
                _objectBlockRepository = new ObjectBlockRepository(taskRepository);

            if (blockFactory != null)
                _blockFactory = blockFactory;
            else
                _blockFactory = new BlockFactory(blockRepository, _rangeBlockRepository, _listBlockRepository, _objectBlockRepository, _taskExecutionRepository);

            if (cleanUpRepository == null)
                cleanUpRepository = new CleanUpRepository(taskRepository);

            if (cleanUpService != null)
                _cleanUpService = cleanUpService;
            else
                _cleanUpService = new CleanUpService(_configuration, cleanUpRepository);
        }