Exemple #1
0
        /// <summary>
        /// Creates a new pipeline from the given <see cref="IPipelineStep{TInput, TOutput}"/>.
        /// </summary>
        /// <param name="function">The function to create the pipeline from.</param>
        /// <typeparam name="TInput">The type of the input to the pipeline.</typeparam>
        /// <typeparam name="TOutput">The type of the output to the pipeline.</typeparam>
        /// <returns>The pipeline object generated.</returns>
        public static IPipeline <TInput, TOutput> Create <TInput, TOutput>(Func <TInput, PipelineContext, TOutput> function)
        {
            var functionWrapper = new FunctionStep <TInput, TOutput>(function);

            return(Create(functionWrapper));
        }
Exemple #2
0
        /// <inheritdoc />
        public IPipeline <TInput, TSubOutput> Then <TSubOutput>(Func <TOutput, PipelineContext, TSubOutput> function)
        {
            var functionWrapper = new FunctionStep <TOutput, TSubOutput>(function);

            return(Then(functionWrapper));
        }