public Connection(NamedPipeServerStream serverStream, ITracer tracer, Func <bool> isStopping) { this.serverStream = serverStream; this.tracer = tracer; this.isStopping = isStopping; this.reader = new NamedPipeStreamReader(this.serverStream); this.writer = new NamedPipeStreamWriter(this.serverStream); }
public void Dispose() { this.ValidateConnection(); if (this.clientStream != null) { this.clientStream.Dispose(); this.clientStream = null; } this.reader = null; this.writer = null; }