protected override void Dispose(bool disposing) { if (disposing && StreamToCapture != null) { StreamToCapture.Dispose(); } base.Dispose(disposing); }
public override int Read(byte[] buffer, int offset, int count) { // Read into the given buffer: var bytesRead = StreamToCapture.Read(buffer, offset, count); Debug.Assert(bytesRead <= count); // Copy that data to the capture buffer: if (CaptureTarget != null) { CaptureTarget.Write(buffer, offset, bytesRead); } return(bytesRead); }
public override void Flush() { StreamToCapture.Flush(); }