public WorkflowBuilder StartWith <TActivity>() where TActivity : WorkflowActivity, new() { var firstActivity = new TActivity(); _flow.AddVertex(firstActivity); _first = firstActivity; return(this); }
public WorkflowActivityBuilder <TActivity> StartWith <TActivity>(Action <TActivity> configure = null) where TActivity : WorkflowActivity, new() { var firstActivity = new TActivity(); configure?.Invoke(firstActivity); _flow.AddVertex(firstActivity); _first = firstActivity; return(new WorkflowActivityBuilder <TActivity>(this, firstActivity)); }
public WorkflowDefinition(AdjacencyGraph <WorkflowActivity, EdgeWithPredicate> flow, WorkflowActivity first) { _flow = flow; FirstActivity = first; }