The title of my question says it all.
I am looking for a TPL dataflow block that doesn't need an input.
Right now I am using a transform block but it's input is unused.
The title of my question says it all.
I am looking for a TPL dataflow block that doesn't need an input.
Right now I am using a transform block but it's input is unused.
I would build a block like this from a
BufferBlock<T>
: the method accepts a delegate that presents theITargetBlock<T>
side of the block and returns theISourceBlock<T>
side of it. This way, the delegate can send input to the block, but from the outside, it looks like a block that only produces output.The code:
Example usage: