public IPipeElement <TimerPipeContext, TimerInfo, TReturn> StartWithTimer <TReturn>( TimerInfo timer, IAsyncTimerStepProvider <TimerInfo, TReturn> provider) { var context = new TimerPipeContext(_serviceProvider, timer); return(new StartElement <TimerPipeContext, TimerInfo, TReturn>(context, timer, provider)); }
public static async Task CompleteWithAsync <TInput, TInputForNextStep>( this IPipeElement <TimerPipeContext, TInput, TInputForNextStep> element, IAsyncTimerStepProvider <TInputForNextStep?, bool> provider) { var finalStep = new FinalElement <TimerPipeContext, TInputForNextStep, bool>( element.Context, element.PreviousElements.Append(element), provider); await finalStep.CompletePipeAsync(); }