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));
        }
Ejemplo n.º 2
0
        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();
        }