private static void CreatePipeEnds(out TextWriter @out, out TextReader @in) { var str = new SimulatedPipe(); @out = TextWriter.Synchronized(new StreamWriter(new SimPipeStream(str, true), Encoding.UTF8, 256) { AutoFlush = true }); @in = TextReader.Synchronized(new StreamReader(new SimPipeStream(str, false), Encoding.UTF8, false, 256)); }
internal SimPipeStream(SimulatedPipe pipe, bool isWriter) { _pipe = pipe; _isWriter = isWriter; }