I have defined a Pipe class in Java, making use of PipedReader
and PipedWriter
. I am now trying to port this same class to C#. Is it possible to accomplish the same as shown in the following code in C#?
public final class Pipe {
private final PipedReader pipedReader = new PipedReader();
private final PipedWriter pipedWriter = new PipedWriter();
public Pipe() {
pipedWriter.connect(pipedReader);
}
...
}
I am guessing what I'll want to use in C# for PipedReader
and PipedWriter
will be StreamReader
and StreamWriter
?
Is there something like a connect()
method?
So, my goal is to implement a (little) Pipe&Filter framework. My idea would be to create a Pipe class and Filter classes, so that when I need to implement some system using a Pipe&Filter architecture style, I'll code it against this little framework I am using. Each filter would run on its own thread.
Thanks
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.