我正在使用 TPL 数据流构建应用程序。其实我有以下问题。我有一个 transformblock var tfb1 = new TranformBlock<InMsg, IReadOnlyCollection<OutMsg>>。所以tfb1接收消息并创建一个输出消息列表。此输出消息列表应链接到路由器数据块,该数据块OutMsg作为输入接收(而不是IReadOnlyCollection<OutMsg>)。
我怎样才能展平IReadOnlyCollection以便包含的消息可以用作输入,例如TransformBlock<OutMsg, SomeOtherType>. 可以通过LinkTo()吗?
谢谢