using System.Collections.Generic;
private readonly List<Action> _steps;
private Workflow(List<Action> steps)
foreach (var step in _steps)
private readonly List<Action> _steps = new List<Action>();
public Builder Step(Action action)
return new Workflow(_steps);
public static void Main()
var workflow = new Workflow.Builder()
.Step(() => Console.WriteLine("Step 1"))
.Step(() => Console.WriteLine("Step 2"))