Advertisement
Guest User

Untitled

a guest
Oct 26th, 2014
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public SynchronousTaskListWorkflow(params BaseSynchronousTask[] tasks)
  2. {
  3. if (tasks.Length == 0) throw new ArgumentException("Task list cannot be empty");
  4.  
  5. WorkflowNode current = null;
  6.  
  7. for (int i = tasks.Length; i >= 1; i--)
  8. current = new WorkflowNode(tasks[i - 1].Name, tasks[i - 1], current);
  9.  
  10. if (current == null)
  11. current = new WorkflowNode(tasks[0].Name, null);
  12.  
  13. root = current;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement