Esempio n. 1
0
 protected void LoadPendingImportJobs()
 {
     lock (_syncObj)
     {
         ISettingsManager       settingsManager = ServiceRegistration.Get <ISettingsManager>();
         ImporterWorkerSettings settings        = settingsManager.Load <ImporterWorkerSettings>();
         _importJobs.Clear();
         CollectionUtils.AddAll(_importJobs, settings.PendingImportJobs);
         _importJobsReadyAvailableEvent.Set();
     }
 }
Esempio n. 2
0
 protected void PersistPendingImportJobs()
 {
     lock (_syncObj)
     {
         ISettingsManager       settingsManager = ServiceRegistration.Get <ISettingsManager>();
         ImporterWorkerSettings settings        = settingsManager.Load <ImporterWorkerSettings>();
         settings.PendingImportJobs = new List <ImportJob>(_importJobs);
         settingsManager.Save(settings);
         foreach (ImportJob job in _importJobs)
         {
             job.Dispose();
         }
         _importJobs.Clear();
     }
 }