如何正确地将link几个BufferBlocks放在一起?

How to properly link several BufferBlocks together?

我想将几个缓冲块(生产者)转储到一个缓冲块(消费者)中。我尝试了下面代码的扩展,但消费者没有填充任何生产者数据。我在这里做错了什么?

        var bbA = new BufferBlock<int>();
        var bbB = new BufferBlock<int>();
        bbB.LinkTo(bbA);
        bbA.SendAsync(1).Wait();
        bbA.SendAsync(2).Wait();
        //bbB is still empty here despite the linking? 

反过来,你应该link源到目标。

试试这个:

bbA.LinkTo(bbB);