SyncTask.cs 434 B

123456789101112131415161718192021222324252627282930
  1. using System;
  2. using System.Collections.Generic;
  3. namespace com.workman.cm3d2.task
  4. {
  5. public class SyncTask : Task
  6. {
  7. public SyncTask()
  8. {
  9. }
  10. public SyncTask(List<Task> listSyncTask)
  11. {
  12. this.listSyncTask = listSyncTask;
  13. }
  14. public override void Execute()
  15. {
  16. foreach (Task task in this.listSyncTask)
  17. {
  18. if (task.action != null)
  19. {
  20. task.action();
  21. }
  22. }
  23. }
  24. public List<Task> listSyncTask;
  25. }
  26. }