Exemple #1
0
        public void Tasks_Cleanup()
        {
            var id  = Guid.NewGuid();
            var mre = new ManualResetEvent(false);

            TasksHost.Enqueue <MyTask>(id,
                                       completed: (dic) =>
            {
                mre.Set();
            });
            mre.WaitOne();
            TasksHost.Cleanup();
            var result = TasksHost.GetHistory(id);

            Check.That(result).IsNull();
        }