Class AsyncPipelineBuilderExtensions
- Namespace
- Executables.Pipelines
- Assembly
- executables.dll
Extension methods for building asynchronous pipelines.
public static class AsyncPipelineBuilderExtensions
- Inheritance
-
AsyncPipelineBuilderExtensions
- Inherited Members
Methods
End<T1, T2, T3, T4>(AsyncPipelineBuilder<T1, T2, T3, T4>, IAsyncExecutable<T2, T3>)
Finalizes async pipeline composition with a terminal async executable.
[Pure]
public static IAsyncExecutor<T1, T4> End<T1, T2, T3, T4>(this AsyncPipelineBuilder<T1, T2, T3, T4> builder, IAsyncExecutable<T2, T3> executable)
Parameters
builderAsyncPipelineBuilder<T1, T2, T3, T4>Builder being finalized.
executableIAsyncExecutable<T2, T3>Terminal async executable invoked when pipeline reaches the end.
Returns
- IAsyncExecutor<T1, T4>
Composed async executor that represents the entire pipeline chain.
Type Parameters
T1Input type of the final composed async executor.
T2Input type expected by current downstream async segment.
T3Output type produced by current downstream async segment.
T4Output type of the final composed async executor.
Exceptions
- ArgumentNullException
executableis null.
Use<T1, T2>(AsyncPipelineBuilder<T1, Unit, Unit, T2>, AsyncAction<AsyncAction>)
Appends async middleware step to parameterless continuation chain.
public static AsyncPipelineBuilder<T1, Unit, Unit, T2> Use<T1, T2>(this AsyncPipelineBuilder<T1, Unit, Unit, T2> builder, AsyncAction<AsyncAction> middleware)
Parameters
builderAsyncPipelineBuilder<T1, Unit, Unit, T2>Builder being extended.
middlewareAsyncAction<AsyncAction>Async middleware action with parameterless downstream action access.
Returns
- AsyncPipelineBuilder<T1, Unit, Unit, T2>
Builder with downstream input/output fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Output type of the final composed async executor.
Use<T1, T2, T3>(AsyncPipelineBuilder<T1, Unit, Unit, T3>, AsyncAction<AsyncAction<T2>>)
Appends async middleware step to a parameterless chain as action with downstream async action.
public static AsyncPipelineBuilder<T1, T2, Unit, T3> Use<T1, T2, T3>(this AsyncPipelineBuilder<T1, Unit, Unit, T3> builder, AsyncAction<AsyncAction<T2>> middleware)
Parameters
builderAsyncPipelineBuilder<T1, Unit, Unit, T3>Builder being extended.
middlewareAsyncAction<AsyncAction<T2>>Async middleware action with downstream async action access.
Returns
- AsyncPipelineBuilder<T1, T2, Unit, T3>
Builder with downstream output fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Input type of downstream async action.
T3Output type of the final composed async executor.
Use<T1, T2, T3>(AsyncPipelineBuilder<T1, Unit, Unit, T3>, AsyncAction<AsyncFunc<T2>>)
Appends async middleware step to a parameterless chain as action with downstream parameterless async function.
public static AsyncPipelineBuilder<T1, Unit, T2, T3> Use<T1, T2, T3>(this AsyncPipelineBuilder<T1, Unit, Unit, T3> builder, AsyncAction<AsyncFunc<T2>> middleware)
Parameters
builderAsyncPipelineBuilder<T1, Unit, Unit, T3>Builder being extended.
middlewareAsyncAction<AsyncFunc<T2>>Async middleware action with downstream parameterless async function access.
Returns
- AsyncPipelineBuilder<T1, Unit, T2, T3>
Builder with downstream input fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Output type of downstream parameterless async function.
T3Output type of the final composed async executor.
Use<T1, T2, T3>(AsyncPipelineBuilder<T1, Unit, T2, T3>, AsyncFunc<AsyncAction, T2>)
Appends async middleware step to a parameterless chain as function with downstream parameterless async action.
public static AsyncPipelineBuilder<T1, Unit, Unit, T3> Use<T1, T2, T3>(this AsyncPipelineBuilder<T1, Unit, T2, T3> builder, AsyncFunc<AsyncAction, T2> middleware)
Parameters
builderAsyncPipelineBuilder<T1, Unit, T2, T3>Builder being extended.
middlewareAsyncFunc<AsyncAction, T2>Async middleware delegate with downstream parameterless async action access.
Returns
- AsyncPipelineBuilder<T1, Unit, Unit, T3>
Builder with downstream input/output fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Output type produced by current step.
T3Output type of the final composed async executor.
Use<T1, T2, T3>(AsyncPipelineBuilder<T1, T2, Unit, T3>, AsyncAction<T2, AsyncAction>)
Appends async middleware step expressed as action with no args.
public static AsyncPipelineBuilder<T1, Unit, Unit, T3> Use<T1, T2, T3>(this AsyncPipelineBuilder<T1, T2, Unit, T3> builder, AsyncAction<T2, AsyncAction> middleware)
Parameters
builderAsyncPipelineBuilder<T1, T2, Unit, T3>Builder being extended.
middlewareAsyncAction<T2, AsyncAction>Async middleware action with parameterless downstream action access.
Returns
- AsyncPipelineBuilder<T1, Unit, Unit, T3>
Builder with downstream input/output fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Input type accepted by current step.
T3Output type of the final composed async executor.
Use<T1, T2, T3, T4>(AsyncPipelineBuilder<T1, Unit, Unit, T4>, AsyncAction<AsyncFunc<T2, T3>>)
Appends async middleware step to a parameterless chain as action with downstream async function.
public static AsyncPipelineBuilder<T1, T2, T3, T4> Use<T1, T2, T3, T4>(this AsyncPipelineBuilder<T1, Unit, Unit, T4> builder, AsyncAction<AsyncFunc<T2, T3>> middleware)
Parameters
builderAsyncPipelineBuilder<T1, Unit, Unit, T4>Builder being extended.
middlewareAsyncAction<AsyncFunc<T2, T3>>Async middleware action with downstream async function access.
Returns
- AsyncPipelineBuilder<T1, T2, T3, T4>
Builder with updated downstream type pair
T2/T3.
Type Parameters
T1Input type of the final composed async executor.
T2Input type of downstream async function.
T3Output type of downstream async function.
T4Output type of the final composed async executor.
Use<T1, T2, T3, T4>(AsyncPipelineBuilder<T1, Unit, T2, T4>, AsyncFunc<AsyncAction<T3>, T2>)
Appends async middleware step to a parameterless chain as function with downstream async action.
public static AsyncPipelineBuilder<T1, T3, Unit, T4> Use<T1, T2, T3, T4>(this AsyncPipelineBuilder<T1, Unit, T2, T4> builder, AsyncFunc<AsyncAction<T3>, T2> middleware)
Parameters
builderAsyncPipelineBuilder<T1, Unit, T2, T4>Builder being extended.
middlewareAsyncFunc<AsyncAction<T3>, T2>Async middleware delegate with downstream async action access.
Returns
- AsyncPipelineBuilder<T1, T3, Unit, T4>
Builder with downstream output fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Output type produced by current step.
T3Input type of downstream async action.
T4Output type of the final composed async executor.
Use<T1, T2, T3, T4>(AsyncPipelineBuilder<T1, Unit, T2, T4>, AsyncFunc<AsyncFunc<T3>, T2>)
Appends async middleware step to a parameterless chain as function with downstream parameterless async function.
public static AsyncPipelineBuilder<T1, Unit, T3, T4> Use<T1, T2, T3, T4>(this AsyncPipelineBuilder<T1, Unit, T2, T4> builder, AsyncFunc<AsyncFunc<T3>, T2> middleware)
Parameters
builderAsyncPipelineBuilder<T1, Unit, T2, T4>Builder being extended.
middlewareAsyncFunc<AsyncFunc<T3>, T2>Async middleware delegate with downstream parameterless async function access.
Returns
- AsyncPipelineBuilder<T1, Unit, T3, T4>
Builder with downstream input fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Output type produced by current step.
T3Output type of downstream parameterless async function.
T4Output type of the final composed async executor.
Use<T1, T2, T3, T4>(AsyncPipelineBuilder<T1, T2, Unit, T4>, AsyncAction<T2, AsyncAction<T3>>)
Appends async middleware step expressed as action with action.
public static AsyncPipelineBuilder<T1, T3, Unit, T4> Use<T1, T2, T3, T4>(this AsyncPipelineBuilder<T1, T2, Unit, T4> builder, AsyncAction<T2, AsyncAction<T3>> middleware)
Parameters
builderAsyncPipelineBuilder<T1, T2, Unit, T4>Builder being extended.
middlewareAsyncAction<T2, AsyncAction<T3>>Async middleware action with downstream typed action access.
Returns
- AsyncPipelineBuilder<T1, T3, Unit, T4>
Builder with downstream output fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Input type accepted by current step.
T3Input type of downstream async action.
T4Output type of the final composed async executor.
Use<T1, T2, T3, T4>(AsyncPipelineBuilder<T1, T2, Unit, T4>, AsyncAction<T2, AsyncFunc<T3>>)
Appends async middleware step expressed as action with downstream parameterless async function.
public static AsyncPipelineBuilder<T1, Unit, T3, T4> Use<T1, T2, T3, T4>(this AsyncPipelineBuilder<T1, T2, Unit, T4> builder, AsyncAction<T2, AsyncFunc<T3>> middleware)
Parameters
builderAsyncPipelineBuilder<T1, T2, Unit, T4>Builder being extended.
middlewareAsyncAction<T2, AsyncFunc<T3>>Async middleware action with downstream parameterless async function access.
Returns
- AsyncPipelineBuilder<T1, Unit, T3, T4>
Builder with downstream input fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Input type accepted by current step.
T3Output type of downstream parameterless async function.
T4Output type of the final composed async executor.
Use<T1, T2, T3, T4>(AsyncPipelineBuilder<T1, T2, T3, T4>, AsyncFunc<T2, AsyncAction, T3>)
Appends async middleware step expressed as function with no args.
public static AsyncPipelineBuilder<T1, Unit, Unit, T4> Use<T1, T2, T3, T4>(this AsyncPipelineBuilder<T1, T2, T3, T4> builder, AsyncFunc<T2, AsyncAction, T3> middleware)
Parameters
builderAsyncPipelineBuilder<T1, T2, T3, T4>Builder being extended.
middlewareAsyncFunc<T2, AsyncAction, T3>Async middleware delegate with parameterless downstream action access.
Returns
- AsyncPipelineBuilder<T1, Unit, Unit, T4>
Builder with downstream input/output fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Input type accepted by current step.
T3Output type produced by current step.
T4Output type of the final composed async executor.
Use<T1, T2, T3, T4, T5>(AsyncPipelineBuilder<T1, Unit, T2, T5>, AsyncFunc<AsyncFunc<T3, T4>, T2>)
Appends async middleware step to a parameterless chain as function with downstream async function.
public static AsyncPipelineBuilder<T1, T3, T4, T5> Use<T1, T2, T3, T4, T5>(this AsyncPipelineBuilder<T1, Unit, T2, T5> builder, AsyncFunc<AsyncFunc<T3, T4>, T2> middleware)
Parameters
builderAsyncPipelineBuilder<T1, Unit, T2, T5>Builder being extended.
middlewareAsyncFunc<AsyncFunc<T3, T4>, T2>Async middleware delegate with downstream async function access.
Returns
- AsyncPipelineBuilder<T1, T3, T4, T5>
Builder with updated downstream type pair
T3/T4.
Type Parameters
T1Input type of the final composed async executor.
T2Output type produced by current step.
T3Input type of downstream async function.
T4Output type of downstream async function.
T5Output type of the final composed async executor.
Use<T1, T2, T3, T4, T5>(AsyncPipelineBuilder<T1, T2, Unit, T5>, AsyncAction<T2, AsyncFunc<T3, T4>>)
Appends async middleware step expressed as action with next func.
public static AsyncPipelineBuilder<T1, T3, T4, T5> Use<T1, T2, T3, T4, T5>(this AsyncPipelineBuilder<T1, T2, Unit, T5> builder, AsyncAction<T2, AsyncFunc<T3, T4>> middleware)
Parameters
builderAsyncPipelineBuilder<T1, T2, Unit, T5>Builder being extended.
middlewareAsyncAction<T2, AsyncFunc<T3, T4>>Async middleware action with downstream function access.
Returns
- AsyncPipelineBuilder<T1, T3, T4, T5>
Builder with updated downstream type pair
T3/T4.
Type Parameters
T1Input type of the final composed async executor.
T2Input type accepted by current step.
T3Input type of downstream async function.
T4Output type of downstream async function.
T5Output type of the final composed async executor.
Use<T1, T2, T3, T4, T5>(AsyncPipelineBuilder<T1, T2, T4, T5>, AsyncFunc<T2, AsyncAction<T3>, T4>)
Appends async middleware step expressed as function with action.
public static AsyncPipelineBuilder<T1, T3, Unit, T5> Use<T1, T2, T3, T4, T5>(this AsyncPipelineBuilder<T1, T2, T4, T5> builder, AsyncFunc<T2, AsyncAction<T3>, T4> middleware)
Parameters
builderAsyncPipelineBuilder<T1, T2, T4, T5>Builder being extended.
middlewareAsyncFunc<T2, AsyncAction<T3>, T4>Async middleware delegate with downstream action access.
Returns
- AsyncPipelineBuilder<T1, T3, Unit, T5>
Builder with downstream output fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Input type accepted by current step.
T3Input type of downstream async action.
T4Output type produced by current step.
T5Output type of the final composed async executor.
Use<T1, T2, T3, T4, T5>(AsyncPipelineBuilder<T1, T2, T4, T5>, AsyncFunc<T2, AsyncFunc<T3>, T4>)
Appends async middleware step expressed as function with downstream parameterless async function.
public static AsyncPipelineBuilder<T1, Unit, T3, T5> Use<T1, T2, T3, T4, T5>(this AsyncPipelineBuilder<T1, T2, T4, T5> builder, AsyncFunc<T2, AsyncFunc<T3>, T4> middleware)
Parameters
builderAsyncPipelineBuilder<T1, T2, T4, T5>Builder being extended.
middlewareAsyncFunc<T2, AsyncFunc<T3>, T4>Async middleware delegate with downstream parameterless async function access.
Returns
- AsyncPipelineBuilder<T1, Unit, T3, T5>
Builder with downstream input fixed to Unit.
Type Parameters
T1Input type of the final composed async executor.
T2Input type accepted by current step.
T3Output type of downstream parameterless async function.
T4Output type produced by current step.
T5Output type of the final composed async executor.
Use<T1, T2, T3, T4, T5, T6>(AsyncPipelineBuilder<T1, T2, T5, T6>, AsyncFunc<T2, AsyncFunc<T3, T4>, T5>)
Appends async middleware step expressed as function with next func.
public static AsyncPipelineBuilder<T1, T3, T4, T6> Use<T1, T2, T3, T4, T5, T6>(this AsyncPipelineBuilder<T1, T2, T5, T6> builder, AsyncFunc<T2, AsyncFunc<T3, T4>, T5> middleware)
Parameters
builderAsyncPipelineBuilder<T1, T2, T5, T6>Builder being extended.
middlewareAsyncFunc<T2, AsyncFunc<T3, T4>, T5>Async middleware delegate with downstream function access.
Returns
- AsyncPipelineBuilder<T1, T3, T4, T6>
Builder with updated downstream type pair
T3/T4.
Type Parameters
T1Input type of the final composed async executor.
T2Input type accepted by current step.
T3Input type of downstream async function.
T4Output type of downstream async function.
T5Output type produced by current step.
T6Output type of the final composed async executor.