PipeAndFilter API:IPipeAndFilterAggregate
IPipeAndFilterAggregate<T>
Namespace: PipeFilterCore
Represents commands task for Aggregate pipe.
public interface IPipeAndFilterAggregate<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
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
AddTask(Func<EventPipe<T>, CancellationToken, Task>, String)
Add new task (execution in parallel) to the aggregate pipe.
IPipeAndFilterAggregate<T> AddTask(Func<EventPipe<T>, CancellationToken, Task> command, string nametask)
Parameters
command
Func<EventPipe<T>, CancellationToken, Task>
The handler to execute.
nametask
String
The name for task (optional).
Returns
AddTaskCondition(Func<EventPipe<T>, CancellationToken, Task>, String)
Add new task (execution in parallel) with conditions to the aggregate pipe.
IPipeAndFilterAggregateCondition<T> AddTaskCondition(Func<EventPipe<T>, CancellationToken, Task> command, string nametask)
Parameters
command
Func<EventPipe<T>, CancellationToken, Task>
The handler to execute.
nametask
String
The name for task (optional).
Returns
IPipeAndFilterAggregateCondition<T>
AfterRunningAggregatePipe(Func<EventPipe<T>, CancellationToken, Task>, String)
Add new aggregate pipe to run after 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 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
MaxDegreeProcess(Int32)
Maximum number of concurrent tasks enable.
IPipeAndFilterAggregate<T> MaxDegreeProcess(int value)
Parameters
value
Int32
Number of concurrent tasks.
The default value is number of processors.
Returns
WithCondition(Func<EventPipe<T>, CancellationToken, ValueTask<Boolean>>, String)
Add new condition to the aggregate pipe.
IPipeAndFilterAggregate<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
WithGotoCondition(Func<EventPipe<T>, CancellationToken, ValueTask<Boolean>>, String, String)
Add new go to condition to the aggregate pipe.
If the condition is true, jump to the given pipe without executing the current pipe.
If the false condition continues.
IPipeAndFilterAggregate<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).