Table of Contents

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

p IPipelineBuilder<TFirst, ISourceBlock<T>>
predicate Predicate<T>
thenBlock IPropagatorBlock<T, O>
elseBlock IPropagatorBlock<T, O>
options ExecutionDataflowBlockOptions

Returns

IPipelineBuilder<TFirst, ChoiceBlock<T, O>>

Type Parameters

TFirst
T
O

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

p IPipelineBuilder<TFirst, ISourceBlock<T>>
keySelector Func<T, TKey>
options ExecutionDataflowBlockOptions
flushOnIdle bool

Returns

IPipelineBuilder<TFirst, GroupAdjacentBlock<T, TKey, T>>

Type Parameters

TFirst
T
TKey

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

p IPipelineBuilder<TFirst, ISourceBlock<T>>
keySelector Func<T, TKey>
valueSelector Func<T, TValue>
options ExecutionDataflowBlockOptions
flushOnIdle bool

Returns

IPipelineBuilder<TFirst, GroupAdjacentBlock<T, TKey, TValue>>

Type Parameters

TFirst
T
TKey
TValue

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

p IPipelineBuilder<TFirst, ISourceBlock<TOutput>>
blocks IPropagatorBlock<TOutput, TOutput>[]
options GuaranteedBroadcastBlockOptions

Returns

IPipelineBuilder<TFirst, ISourceBlock<TOutput>>

Type Parameters

TFirst
TOutput

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

p IPipelineBuilder<TFirst, ISourceBlock<TInput>>
block1 IPropagatorBlock<TInput, T1>
block2 IPropagatorBlock<TInput, T2>
f Func<T1, T2, TOutput>
options GuaranteedBroadcastBlockOptions

Returns

IPipelineBuilder<TFirst, ISourceBlock<TOutput>>

Type Parameters

TFirst
TInput
T1
T2
TOutput

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

p IPipelineBuilder<TFirst, ISourceBlock<TOutput>>
options DataflowBlockOptions
onEntered Action

Returns

IPipelineBuilder<TFirst, ResizableBufferBlock<TOutput>>

Type Parameters

TFirst
TOutput

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

p IPipelineBuilder<TFirst, ISourceBlock<T>>
predicate Predicate<T>
mode FilterMode

Returns

IPipelineBuilder<TFirst, SynchronousFilterBlock<T>>

Type Parameters

TFirst
T

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

p IPipelineBuilder<TFirst, ISourceBlock<T>>
transform Func<T, O>

Returns

IPipelineBuilder<TFirst, SynchronousTransformingBlock<T, O>>

Type Parameters

TFirst
T
O

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

p IPipelineBuilder<TFirst, ISourceBlock<I>>
inner IPropagatorBlock<I, T>
combinator Func<I, T, O>
options DataflowBlockOptions

Returns

IPipelineBuilder<TFirst, ISourceBlock<O>>

Type Parameters

TFirst
I
T
O

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

p IPipelineBuilder<TFirst, ISourceBlock<T>>
hooks ConfigureHooks<T>

Returns

IPipelineBuilder<TFirst, NotifyingSourceBlock<T>>

Type Parameters

TFirst
T