Class PipelineBuilderExtensions
- Namespace
- CounterpointCollective.Dataflow.Fluent
- Assembly
- Dataflow.Composable.dll
public static class PipelineBuilderExtensions
- Inheritance
-
PipelineBuilderExtensions
- Inherited Members
Methods
Choice<TFirst, T, O>(IPipelineBuilder<TFirst, ISourceBlock<T>>, Predicate<T>, IPropagatorBlock<T, O>, IPropagatorBlock<T, O>, ExecutionDataflowBlockOptions?)
Links an choice block to the end of the current IPipelineBuilder.
public static IPipelineBuilder<TFirst, ChoiceBlock<T, O>> Choice<TFirst, T, O>(this IPipelineBuilder<TFirst, ISourceBlock<T>> p, Predicate<T> predicate, IPropagatorBlock<T, O> thenBlock, IPropagatorBlock<T, O> elseBlock, ExecutionDataflowBlockOptions? options = null) where TFirst : IDataflowBlock
Parameters
pIPipelineBuilder<TFirst, ISourceBlock<T>>predicatePredicate<T>thenBlockIPropagatorBlock<T, O>elseBlockIPropagatorBlock<T, O>optionsExecutionDataflowBlockOptions
Returns
- IPipelineBuilder<TFirst, ChoiceBlock<T, O>>
Type Parameters
TFirstTO
GroupAdjacent<TFirst, T, TKey>(IPipelineBuilder<TFirst, ISourceBlock<T>>, Func<T, TKey>, ExecutionDataflowBlockOptions, bool)
Links an GroupAdjacentBlock to the end of the current IPipelineBuilder.
public static IPipelineBuilder<TFirst, GroupAdjacentBlock<T, TKey, T>> GroupAdjacent<TFirst, T, TKey>(this IPipelineBuilder<TFirst, ISourceBlock<T>> p, Func<T, TKey> keySelector, ExecutionDataflowBlockOptions options, bool flushOnIdle = false) where TFirst : IDataflowBlock
Parameters
pIPipelineBuilder<TFirst, ISourceBlock<T>>keySelectorFunc<T, TKey>optionsExecutionDataflowBlockOptionsflushOnIdlebool
Returns
- IPipelineBuilder<TFirst, GroupAdjacentBlock<T, TKey, T>>
Type Parameters
TFirstTTKey
GroupAdjacent<TFirst, T, TKey, TValue>(IPipelineBuilder<TFirst, ISourceBlock<T>>, Func<T, TKey>, Func<T, TValue>, ExecutionDataflowBlockOptions, bool)
Links an GroupAdjacentBlock to the end of the current IPipelineBuilder.
public static IPipelineBuilder<TFirst, GroupAdjacentBlock<T, TKey, TValue>> GroupAdjacent<TFirst, T, TKey, TValue>(this IPipelineBuilder<TFirst, ISourceBlock<T>> p, Func<T, TKey> keySelector, Func<T, TValue> valueSelector, ExecutionDataflowBlockOptions options, bool flushOnIdle = false) where TFirst : IDataflowBlock
Parameters
pIPipelineBuilder<TFirst, ISourceBlock<T>>keySelectorFunc<T, TKey>valueSelectorFunc<T, TValue>optionsExecutionDataflowBlockOptionsflushOnIdlebool
Returns
- IPipelineBuilder<TFirst, GroupAdjacentBlock<T, TKey, TValue>>
Type Parameters
TFirstTTKeyTValue
Parallel<TFirst, TOutput>(IPipelineBuilder<TFirst, ISourceBlock<TOutput>>, IPropagatorBlock<TOutput, TOutput>[], GuaranteedBroadcastBlockOptions?)
Links a ParallelBlock to the end of the current IPipelineBuilder.
public static IPipelineBuilder<TFirst, ISourceBlock<TOutput>> Parallel<TFirst, TOutput>(this IPipelineBuilder<TFirst, ISourceBlock<TOutput>> p, IPropagatorBlock<TOutput, TOutput>[] blocks, GuaranteedBroadcastBlockOptions? options = null) where TFirst : IDataflowBlock
Parameters
pIPipelineBuilder<TFirst, ISourceBlock<TOutput>>blocksIPropagatorBlock<TOutput, TOutput>[]optionsGuaranteedBroadcastBlockOptions
Returns
- IPipelineBuilder<TFirst, ISourceBlock<TOutput>>
Type Parameters
TFirstTOutput
Parallel<TFirst, TInput, T1, T2, TOutput>(IPipelineBuilder<TFirst, ISourceBlock<TInput>>, IPropagatorBlock<TInput, T1>, IPropagatorBlock<TInput, T2>, Func<T1, T2, TOutput>, GuaranteedBroadcastBlockOptions?)
Links a ParallelBlock to the end of the current IPipelineBuilder.
public static IPipelineBuilder<TFirst, ISourceBlock<TOutput>> Parallel<TFirst, TInput, T1, T2, TOutput>(this IPipelineBuilder<TFirst, ISourceBlock<TInput>> p, IPropagatorBlock<TInput, T1> block1, IPropagatorBlock<TInput, T2> block2, Func<T1, T2, TOutput> f, GuaranteedBroadcastBlockOptions? options = null) where TFirst : IDataflowBlock
Parameters
pIPipelineBuilder<TFirst, ISourceBlock<TInput>>block1IPropagatorBlock<TInput, T1>block2IPropagatorBlock<TInput, T2>fFunc<T1, T2, TOutput>optionsGuaranteedBroadcastBlockOptions
Returns
- IPipelineBuilder<TFirst, ISourceBlock<TOutput>>
Type Parameters
TFirstTInputT1T2TOutput
ResizableBuffer<TFirst, TOutput>(IPipelineBuilder<TFirst, ISourceBlock<TOutput>>, DataflowBlockOptions?, Action?)
Links a ResizableBuffer to the end of the current IPipelineBuilder.
public static IPipelineBuilder<TFirst, ResizableBufferBlock<TOutput>> ResizableBuffer<TFirst, TOutput>(this IPipelineBuilder<TFirst, ISourceBlock<TOutput>> p, DataflowBlockOptions? options = null, Action? onEntered = null) where TFirst : IDataflowBlock
Parameters
pIPipelineBuilder<TFirst, ISourceBlock<TOutput>>optionsDataflowBlockOptionsonEnteredAction
Returns
- IPipelineBuilder<TFirst, ResizableBufferBlock<TOutput>>
Type Parameters
TFirstTOutput
SynchronousFilter<TFirst, T>(IPipelineBuilder<TFirst, ISourceBlock<T>>, Predicate<T>, FilterMode)
Wraps the last block of the current IPipelineBuilder in a SynchronousFilterBlock.
public static IPipelineBuilder<TFirst, SynchronousFilterBlock<T>> SynchronousFilter<TFirst, T>(this IPipelineBuilder<TFirst, ISourceBlock<T>> p, Predicate<T> predicate, FilterMode mode = FilterMode.Block) where TFirst : IDataflowBlock
Parameters
pIPipelineBuilder<TFirst, ISourceBlock<T>>predicatePredicate<T>modeFilterMode
Returns
- IPipelineBuilder<TFirst, SynchronousFilterBlock<T>>
Type Parameters
TFirstT
SynchronousTransform<TFirst, T, O>(IPipelineBuilder<TFirst, ISourceBlock<T>>, Func<T, O>)
Wraps the last block of the current IPipelineBuilder in a SynchronousTransformingBlock.
public static IPipelineBuilder<TFirst, SynchronousTransformingBlock<T, O>> SynchronousTransform<TFirst, T, O>(this IPipelineBuilder<TFirst, ISourceBlock<T>> p, Func<T, O> transform) where TFirst : IDataflowBlock
Parameters
pIPipelineBuilder<TFirst, ISourceBlock<T>>transformFunc<T, O>
Returns
- IPipelineBuilder<TFirst, SynchronousTransformingBlock<T, O>>
Type Parameters
TFirstTO
Tee<TFirst, I, T, O>(IPipelineBuilder<TFirst, ISourceBlock<I>>, IPropagatorBlock<I, T>, Func<I, T, O>, DataflowBlockOptions?)
Links an TeeBlock to the end of the current IPipelineBuilder.
public static IPipelineBuilder<TFirst, ISourceBlock<O>> Tee<TFirst, I, T, O>(this IPipelineBuilder<TFirst, ISourceBlock<I>> p, IPropagatorBlock<I, T> inner, Func<I, T, O> combinator, DataflowBlockOptions? options = null) where TFirst : IDataflowBlock
Parameters
pIPipelineBuilder<TFirst, ISourceBlock<I>>innerIPropagatorBlock<I, T>combinatorFunc<I, T, O>optionsDataflowBlockOptions
Returns
- IPipelineBuilder<TFirst, ISourceBlock<O>>
Type Parameters
TFirstITO
WithNotification<TFirst, T>(IPipelineBuilder<TFirst, ISourceBlock<T>>, ConfigureHooks<T>)
Wraps the last block of the current IPipelineBuilder in a SourceBlockWithDeliveryNotification.
public static IPipelineBuilder<TFirst, NotifyingSourceBlock<T>> WithNotification<TFirst, T>(this IPipelineBuilder<TFirst, ISourceBlock<T>> p, ConfigureHooks<T> hooks) where TFirst : IDataflowBlock
Parameters
pIPipelineBuilder<TFirst, ISourceBlock<T>>hooksConfigureHooks<T>
Returns
- IPipelineBuilder<TFirst, NotifyingSourceBlock<T>>
Type Parameters
TFirstT