core-dotnet icon indicating copy to clipboard operation
core-dotnet copied to clipboard

Job with Steps

Open WillSoss opened this issue 4 years ago • 0 comments

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());
}

WillSoss avatar Jan 24 '21 20:01 WillSoss