Beispiel #1
0
        public JobWorkers(ISLogger logger, IResourceManager resourceManager, IUnitOfWork unitOfWork,
                          SQLTaskScheduler scheduler, IEncryptionManager encryptionManager)
        {
            this.logger            = logger;
            this.resourceManager   = resourceManager;
            this.unitOfWork        = unitOfWork;
            this.scheduler         = scheduler;
            this.encryptionManager = encryptionManager;



            ILocalStorage localDb = ServiceLocator.Current.GetInstance <ILocalStorage>();

            // BaseJobUpdater fullJobUpdater = new FullJobUpdater(instanceInfoUpdater, logger, unitOfWork, connManager, instanceDataCollector);
            // BaseJobUpdater statusJobUpdater = new StatusJobUpdater(instanceInfoUpdater, logger, unitOfWork, connManager, instanceDataCollector);


            BaseJobSaver fullJobSaver   = new FullJobSaver(logger, localDb, scheduler);
            BaseJobSaver statusJobSaver = new StatusJobSaver(logger, localDb, scheduler);
            BaseJobSaver removeJobSaver = new RemoveJobSaver(logger, localDb, scheduler);


            saveWorkers.Add(JobType.UpdateInfoType.Full, fullJobSaver);
            saveWorkers.Add(JobType.UpdateInfoType.CheckStatus, statusJobSaver);
            saveWorkers.Add(JobType.UpdateInfoType.RemoveInstances, removeJobSaver);


            //updateWorkers.Add(JobType.UpdateInfoType.Full, fullJobUpdater);
            // updateWorkers.Add(JobType.UpdateInfoType.CheckStatus, statusJobUpdater);
        }
Beispiel #2
0
        public JobWorkers(ISLogger logger, IResourceManager resourceManager, IUnitOfWork unitOfWork,
                          SQLTaskScheduler scheduler, IEncryptionManager encryptionManager)
        {
            this.logger            = logger;
            this.resourceManager   = resourceManager;
            this.unitOfWork        = unitOfWork;
            this.scheduler         = scheduler;
            this.encryptionManager = encryptionManager;

            /*
             * InstanceInfoUpdater instanceInfoUpdater = new InstanceInfoUpdater(logger);
             * IInstanceDataCollector instanceDataCollector = DependencyConfig.Initialize().Resolve<IInstanceDataCollector>(
             *                                                 new ParameterOverride("connManager", connManager),
             *                                                 new ParameterOverride("resourceManager", resourceManager),
             *                                                 new ParameterOverride("logger", logger));
             */

            ILocalStorage localDb = ServiceLocator.Current.GetInstance <ILocalStorage>();

            // BaseJobUpdater fullJobUpdater = new FullJobUpdater(instanceInfoUpdater, logger, unitOfWork, connManager, instanceDataCollector);
            // BaseJobUpdater statusJobUpdater = new StatusJobUpdater(instanceInfoUpdater, logger, unitOfWork, connManager, instanceDataCollector);


            BaseJobSaver fullJobSaver   = new FullJobSaver(logger, localDb, scheduler);
            BaseJobSaver statusJobSaver = new StatusJobSaver(logger, localDb, scheduler);


            saveWorkers.Add(JobType.UpdateInfoType.Full, fullJobSaver);
            saveWorkers.Add(JobType.UpdateInfoType.CheckStatus, statusJobSaver);


            //updateWorkers.Add(JobType.UpdateInfoType.Full, fullJobUpdater);
            // updateWorkers.Add(JobType.UpdateInfoType.CheckStatus, statusJobUpdater);
        }