Class AsyncPipeline
- Namespace
- Executables
- Assembly
- executables.dll
Entry point for building asynchronous middleware pipelines.
public static class AsyncPipeline
- Inheritance
-
AsyncPipeline
- Inherited Members
Methods
Use(AsyncAction<AsyncAction>)
Starts a parameterless async pipeline from a step that receives next async action.
public static AsyncPipelineBuilder<Unit, Unit, Unit, Unit> Use(AsyncAction<AsyncAction> middleware)
Parameters
middlewareAsyncAction<AsyncAction>Async middleware action that calls downstream action.
Returns
Exceptions
- ArgumentNullException
middlewareis null.
Use<T>(AsyncAction<AsyncAction<T>>)
Starts a parameterless async void pipeline from a step that receives downstream typed async action.
public static AsyncPipelineBuilder<Unit, T, Unit, Unit> Use<T>(AsyncAction<AsyncAction<T>> middleware)
Parameters
middlewareAsyncAction<AsyncAction<T>>Async middleware action that can invoke downstream async action.
Returns
- AsyncPipelineBuilder<Unit, T, Unit, Unit>
Builder with downstream output fixed to Unit.
Type Parameters
TInput type accepted by the downstream async action.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T>(AsyncAction<AsyncFunc<T>>)
Starts a parameterless async void pipeline from a step that receives downstream parameterless async function.
public static AsyncPipelineBuilder<Unit, Unit, T, Unit> Use<T>(AsyncAction<AsyncFunc<T>> middleware)
Parameters
middlewareAsyncAction<AsyncFunc<T>>Async middleware action that can invoke downstream parameterless async function.
Returns
- AsyncPipelineBuilder<Unit, Unit, T, Unit>
Builder with downstream input fixed to Unit.
Type Parameters
TOutput type returned by the downstream parameterless async function.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T>(AsyncAction<T, AsyncAction>)
Starts an async void pipeline from a step that forwards via parameterless async action.
public static AsyncPipelineBuilder<T, Unit, Unit, Unit> Use<T>(AsyncAction<T, AsyncAction> middleware)
Parameters
middlewareAsyncAction<T, AsyncAction>Async middleware action that calls downstream action.
Returns
- AsyncPipelineBuilder<T, Unit, Unit, Unit>
Builder whose downstream input and output types are Unit.
Type Parameters
TInput type accepted by the middleware.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T>(AsyncFunc<AsyncAction, T>)
Starts a parameterless async pipeline that returns value and can invoke downstream parameterless async action.
public static AsyncPipelineBuilder<Unit, Unit, Unit, T> Use<T>(AsyncFunc<AsyncAction, T> middleware)
Parameters
middlewareAsyncFunc<AsyncAction, T>Async middleware function that can invoke downstream parameterless async action.
Returns
- AsyncPipelineBuilder<Unit, Unit, Unit, T>
Builder with downstream input/output fixed to Unit.
Type Parameters
TOutput type returned by the middleware.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2>(AsyncAction<AsyncFunc<T1, T2>>)
Starts a parameterless async void pipeline from a step that receives downstream typed async function.
public static AsyncPipelineBuilder<Unit, T1, T2, Unit> Use<T1, T2>(AsyncAction<AsyncFunc<T1, T2>> middleware)
Parameters
middlewareAsyncAction<AsyncFunc<T1, T2>>Async middleware action that can invoke downstream async function.
Returns
- AsyncPipelineBuilder<Unit, T1, T2, Unit>
Builder for appending next middleware steps and terminal async executable.
Type Parameters
T1Input type expected by the downstream async function.
T2Output type returned by the downstream async function.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2>(AsyncAction<T1, AsyncAction<T2>>)
Starts an async void pipeline from a step that forwards via typed async action.
public static AsyncPipelineBuilder<T1, T2, Unit, Unit> Use<T1, T2>(AsyncAction<T1, AsyncAction<T2>> middleware)
Parameters
middlewareAsyncAction<T1, AsyncAction<T2>>Async middleware action that calls downstream action.
Returns
- AsyncPipelineBuilder<T1, T2, Unit, Unit>
Builder whose downstream output type is Unit.
Type Parameters
T1Input type accepted by the middleware.
T2Input type accepted by the downstream async action.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2>(AsyncAction<T1, AsyncFunc<T2>>)
Starts an async void pipeline from a step that receives downstream parameterless async function.
public static AsyncPipelineBuilder<T1, Unit, T2, Unit> Use<T1, T2>(AsyncAction<T1, AsyncFunc<T2>> middleware)
Parameters
middlewareAsyncAction<T1, AsyncFunc<T2>>Async middleware action that can invoke downstream parameterless async function.
Returns
- AsyncPipelineBuilder<T1, Unit, T2, Unit>
Builder with downstream input fixed to Unit.
Type Parameters
T1Input type accepted by the middleware.
T2Output type returned by the downstream parameterless async function.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2>(AsyncFunc<AsyncAction<T1>, T2>)
Starts a parameterless async pipeline that returns value and can invoke downstream typed async action.
public static AsyncPipelineBuilder<Unit, T1, Unit, T2> Use<T1, T2>(AsyncFunc<AsyncAction<T1>, T2> middleware)
Parameters
middlewareAsyncFunc<AsyncAction<T1>, T2>Async middleware function that can invoke downstream async action.
Returns
- AsyncPipelineBuilder<Unit, T1, Unit, T2>
Builder with downstream output fixed to Unit.
Type Parameters
T1Input type accepted by the downstream async action.
T2Output type returned by the middleware.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2>(AsyncFunc<AsyncFunc<T1>, T2>)
Starts a parameterless async pipeline that returns value and can invoke downstream parameterless async function.
public static AsyncPipelineBuilder<Unit, Unit, T1, T2> Use<T1, T2>(AsyncFunc<AsyncFunc<T1>, T2> middleware)
Parameters
middlewareAsyncFunc<AsyncFunc<T1>, T2>Async middleware function that can invoke downstream parameterless async function.
Returns
- AsyncPipelineBuilder<Unit, Unit, T1, T2>
Builder with downstream input fixed to Unit.
Type Parameters
T1Output type returned by the downstream parameterless async function.
T2Output type returned by the middleware.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2>(AsyncFunc<T1, AsyncAction, T2>)
Starts an async pipeline from a step that forwards via parameterless async action.
public static AsyncPipelineBuilder<T1, Unit, Unit, T2> Use<T1, T2>(AsyncFunc<T1, AsyncAction, T2> middleware)
Parameters
middlewareAsyncFunc<T1, AsyncAction, T2>Async middleware function that calls downstream action.
Returns
- AsyncPipelineBuilder<T1, Unit, Unit, T2>
Builder whose downstream input and output types are Unit.
Type Parameters
T1Input type accepted by the middleware.
T2Output type returned by the middleware.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2, T3>(AsyncAction<T1, AsyncFunc<T2, T3>>)
Starts an async void pipeline from a step that receives downstream async function.
public static AsyncPipelineBuilder<T1, T2, T3, Unit> Use<T1, T2, T3>(AsyncAction<T1, AsyncFunc<T2, T3>> middleware)
Parameters
middlewareAsyncAction<T1, AsyncFunc<T2, T3>>Async middleware action that can invoke downstream function.
Returns
- AsyncPipelineBuilder<T1, T2, T3, Unit>
Builder for appending next middleware steps and terminal async executable.
Type Parameters
T1Input type accepted by the middleware.
T2Input type expected by the downstream async function.
T3Output type returned by the downstream async function.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2, T3>(AsyncFunc<AsyncFunc<T1, T2>, T3>)
Starts a parameterless async pipeline that returns value and can invoke downstream typed async function.
public static AsyncPipelineBuilder<Unit, T1, T2, T3> Use<T1, T2, T3>(AsyncFunc<AsyncFunc<T1, T2>, T3> middleware)
Parameters
middlewareAsyncFunc<AsyncFunc<T1, T2>, T3>Async middleware function that can invoke downstream async function.
Returns
- AsyncPipelineBuilder<Unit, T1, T2, T3>
Builder for appending next middleware steps and terminal async executable.
Type Parameters
T1Input type expected by the downstream async function.
T2Output type returned by the downstream async function.
T3Output type returned by the middleware.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2, T3>(AsyncFunc<T1, AsyncAction<T2>, T3>)
Starts an async pipeline from a step that forwards via typed async action.
public static AsyncPipelineBuilder<T1, T2, Unit, T3> Use<T1, T2, T3>(AsyncFunc<T1, AsyncAction<T2>, T3> middleware)
Parameters
middlewareAsyncFunc<T1, AsyncAction<T2>, T3>Async middleware function that calls downstream action.
Returns
- AsyncPipelineBuilder<T1, T2, Unit, T3>
Builder whose downstream output type is Unit.
Type Parameters
T1Input type accepted by the middleware.
T2Input type accepted by the downstream async action.
T3Output type returned by the middleware.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2, T3>(AsyncFunc<T1, AsyncFunc<T2>, T3>)
Starts an async pipeline from a step that receives downstream parameterless async function.
public static AsyncPipelineBuilder<T1, Unit, T2, T3> Use<T1, T2, T3>(AsyncFunc<T1, AsyncFunc<T2>, T3> middleware)
Parameters
middlewareAsyncFunc<T1, AsyncFunc<T2>, T3>Async middleware function that can invoke downstream parameterless async function.
Returns
- AsyncPipelineBuilder<T1, Unit, T2, T3>
Builder with downstream input fixed to Unit.
Type Parameters
T1Input type accepted by the middleware.
T2Output type returned by the downstream parameterless async function.
T3Output type returned by the middleware.
Exceptions
- ArgumentNullException
middlewareis null.
Use<T1, T2, T3, T4>(AsyncFunc<T1, AsyncFunc<T2, T3>, T4>)
Starts an async pipeline from a step that receives downstream call as async function.
public static AsyncPipelineBuilder<T1, T2, T3, T4> Use<T1, T2, T3, T4>(AsyncFunc<T1, AsyncFunc<T2, T3>, T4> middleware)
Parameters
middlewareAsyncFunc<T1, AsyncFunc<T2, T3>, T4>Async middleware function that can invoke downstream function.
Returns
- AsyncPipelineBuilder<T1, T2, T3, T4>
Builder for appending next middleware steps and terminal async executable.
Type Parameters
T1Input type accepted by the middleware.
T2Input type expected by the downstream async function.
T3Output type returned by the downstream async function.
T4Output type returned by the middleware.
Exceptions
- ArgumentNullException
middlewareis null.