Table of Contents

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

middleware AsyncAction<AsyncAction>

Async middleware action that calls downstream action.

Returns

AsyncPipelineBuilder<Unit, Unit, Unit, Unit>

Builder whose all generic types are Unit.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncAction<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

T

Input type accepted by the downstream async action.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncAction<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

T

Output type returned by the downstream parameterless async function.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncAction<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

T

Input type accepted by the middleware.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncFunc<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

T

Output type returned by the middleware.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncAction<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

T1

Input type expected by the downstream async function.

T2

Output type returned by the downstream async function.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncAction<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

T1

Input type accepted by the middleware.

T2

Input type accepted by the downstream async action.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncAction<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

T1

Input type accepted by the middleware.

T2

Output type returned by the downstream parameterless async function.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncFunc<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

T1

Input type accepted by the downstream async action.

T2

Output type returned by the middleware.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncFunc<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

T1

Output type returned by the downstream parameterless async function.

T2

Output type returned by the middleware.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncFunc<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

T1

Input type accepted by the middleware.

T2

Output type returned by the middleware.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncAction<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

T1

Input type accepted by the middleware.

T2

Input type expected by the downstream async function.

T3

Output type returned by the downstream async function.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncFunc<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

T1

Input type expected by the downstream async function.

T2

Output type returned by the downstream async function.

T3

Output type returned by the middleware.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncFunc<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

T1

Input type accepted by the middleware.

T2

Input type accepted by the downstream async action.

T3

Output type returned by the middleware.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncFunc<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

T1

Input type accepted by the middleware.

T2

Output type returned by the downstream parameterless async function.

T3

Output type returned by the middleware.

Exceptions

ArgumentNullException

middleware is 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

middleware AsyncFunc<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

T1

Input type accepted by the middleware.

T2

Input type expected by the downstream async function.

T3

Output type returned by the downstream async function.

T4

Output type returned by the middleware.

Exceptions

ArgumentNullException

middleware is null.