예제 #1
0
        private void scheduleBackgroundworker_DoWork(object sender, DoWorkEventArgs e)
        {
            IDependencyResolver container          = GlobalConfiguration.Configuration.DependencyResolver;
            ISchedule           ScrapeTaskSchedule = (ISchedule)container.GetService(typeof(ISchedule));

            if (ScrapeTaskSchedule != null)
            {
                while (!scheduleBackgroundworker.CancellationPending)
                {
                    ScrapeTaskSchedule.CreateNewTasks();
                }
            }
        }