I defined the Pipe class in Java using PipedReader and PipedWriter . Now I'm trying to port the same class to C #. Is it possible to do the same as shown in the following C # code?
public final class Pipe { private final PipedReader pipedReader = new PipedReader(); private final PipedWriter pipedWriter = new PipedWriter(); public Pipe() { pipedWriter.connect(pipedReader); } ... }
I guess what I want to use in C # for PipedReader and PipedWriter will be StreamReader and StreamWriter ?
Is there something like connect() method?
Edit
So my goal is to implement the (small) Pipe & Filter structure. My idea would be to create Pipe and Filter class classes, so when I need to implement some system using the Pipe & Filter architecture style, I will code it using this small structure that I use. Each filter will work in its own thread.
thanks
devoured elysium
source share