Skip to the content.

PipeAndFilter API:IPipeAndFilterCondition

Build License NuGet Downloads

Back to List Api

IPipeAndFilterCondition<T>

Namespace: PipeFilterCore

Represents commands for conditions.

public interface IPipeAndFilterCondition<T> : IPipeAndFilterBuild<T>

Type Parameters

T
Type of contract.

Implements IPipeAndFilterBuild<T>

Methods

AddAggregatePipe(Func<EventPipe<T>, CancellationToken, Task>, String)

Add new aggregate pipe.

IPipeAndFilterAggregate<T> AddAggregatePipe(Func<EventPipe<T>, CancellationToken, Task> command, string alias)

Parameters

command Func<EventPipe<T>, CancellationToken, Task>
The handler to execute.
The handler command will run after all tasks are executed.

alias String
The unique alias for pipe.
If the alias is omitted, the alias will be the handler name followed by the reference quantity (if any).
Alias ​​is used to reference in another pipe.

Returns

IPipeAndFilterAggregate<T>

AddPipe(Func<EventPipe<T>, CancellationToken, Task>, String)

Add new pipe.

IPipeAndFilterPipe<T> AddPipe(Func<EventPipe<T>, CancellationToken, Task> command, string alias)

Parameters

command Func<EventPipe<T>, CancellationToken, Task>
The handler to execute.

alias String
The unique alias for pipe.
If the alias is omitted, the alias will be the handler name followed by the reference quantity (if any).
Alias ​​is used to reference in another pipe.

Returns

IPipeAndFilterPipe<T>

AfterRunningAggregatePipe(Func<EventPipe<T>, CancellationToken, Task>, String)

Add new Aggregate pipe to run after pipe/Aggregate pipe completes.

IPipeAndFilterAfterAggregate<T> AfterRunningAggregatePipe(Func<EventPipe<T>, CancellationToken, Task> command, string alias)

Parameters

command Func<EventPipe<T>, CancellationToken, Task>
The handler to execute.
The handler command will run after all tasks are executed.

alias String
The unique alias for pipe.
If the alias is omitted, the alias will be the handler name followed by the reference quantity (if any).
Alias ​​is used to reference in another pipe.

Returns

IPipeAndFilterAfterAggregate<T>

AfterRunningPipe(Func<EventPipe<T>, CancellationToken, Task>, String)

Add new pipe to run after pipe or aggregate pipe completes

IPipeAndFilterAfterPipe<T> AfterRunningPipe(Func<EventPipe<T>, CancellationToken, Task> command, string alias)

Parameters

command Func<EventPipe<T>, CancellationToken, Task>
The handler to execute.
The handler command will run after all tasks are executed.

alias String
The unique alias for pipe.
If the alias is omitted, the alias will be the handler name followed by the reference quantity (if any).
Alias ​​is used to reference in another pipe.

Returns

IPipeAndFilterAfterPipe<T>

WithCondition(Func<EventPipe<T>, CancellationToken, ValueTask<Boolean>>, String)

Add new condition.

IPipeAndFilterCondition<T> WithCondition(Func<EventPipe<T>, CancellationToken, ValueTask<Boolean>> condition, string namecondition)

Parameters

condition Func<EventPipe<T>, CancellationToken, ValueTask<Boolean>>
The handle to execute.

namecondition String
The name for condition(optional).

Returns

IPipeAndFilterCondition<T>

WithGotoCondition(Func<EventPipe<T>, CancellationToken, ValueTask<Boolean>>, String, String)

Add new go to condition.
If the condition is true, jump to the given pipe without executing the current pipe.
If the false condition continues.

IPipeAndFilterCondition<T> WithGotoCondition(Func<EventPipe<T>, CancellationToken, ValueTask<Boolean>> condition, string aliasgoto, string namecondition)

Parameters

condition Func<EventPipe<T>, CancellationToken, ValueTask<Boolean>>
The handle to execute.

aliasgoto String
The alias to another pipe.

namecondition String
The name for condition(optional).

Returns

IPipeAndFilterCondition<T>


Back to List Api