TPL Dataflow how to remove the link between the blocks
问题 I would like to know. How can I remove the link between the blocks? In other words. I want to get opposite of LinkTo. I want to write a logger based on tlp dataflow. I wrote this interface and want to delete a subscription for ILogListener when it needed. public interface ILogManager { void RemoveListener(ILogListener listener); } 回答1: When you link blocks: var link = someSourceBlock.LinkTo(someTargetBlock); you get a return value that implements IDisposable . To kill the link, just dispose