Example #1
0
        //Separate method to load the list of jobs.
        //This could come from a DB for example
        private static void LoadJobs()
        {
            JobManager.UnMark();
            JobTest  test1 = new JobTest(1, Today.AddSeconds(35));
            JobTest2 test2 = new JobTest2(2, Today.AddSeconds(42));

            JobManager.Load(test1);
            JobManager.Load(test2);
            JobManager.DeleteUnMarked();
        }
        public void TestLoad()
        {
            JobManager jobManager = new JobManager(Dump);

            jobManager.UnMark();
            DateTime today = DateTime.UtcNow;
            JobTest  test1 = new JobTest(1, today.AddSeconds(35));
            JobTest2 test2 = new JobTest2(2, today.AddSeconds(42));

            jobManager.Load(test1);
            jobManager.Load(test2);
            jobManager.DeleteUnMarked();
        }