Exemplo n.º 1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing && StreamToCapture != null)
     {
         StreamToCapture.Dispose();
     }
     base.Dispose(disposing);
 }
Exemplo n.º 2
0
        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);
        }
Exemplo n.º 3
0
 public override void Flush()
 {
     StreamToCapture.Flush();
 }