core-dotnet
core-dotnet copied to clipboard
Job with Steps
Job with multiple steps, where each step is treated as an item processed in a job. Steps are configured in the constructor and executed in order.
public class JobWithSteps : JobWithSteps<Config, int>
{
public JobWithSteps(Config config)
: base(config)
{
FirstStep(Step1)
.Then(_ => Step2());
}
private Task<Result> Step1(int arg1) => Task.FromResult(Result.Success());
private Task<Result> Step2() => Task.FromResult(Result.Success());
}