示例#1
0
 public IEnumerable<IJobSync> CreateJobSynchronizers(Config config)
 {
     return config.Jobs.Where(x => x != null).Select(job => _resolver.ResolveJobSync(job));
 }
示例#2
0
        private IEnumerable<IJobSync> CreateAndSetupSingleJobSyncs(Config config)
        {
            var synchronizers = _jobSyncFactory.CreateJobSynchronizers(config);

            foreach (var synchronizer in synchronizers)
            {
                AttachEvents(synchronizer);

                if (synchronizer.IsEnabled)
                    synchronizer.Start();
                yield return synchronizer;
            }
        }