Transmission stream should only be used by unit tests and indirectly by calling Transmission.CreateStream.
Inheritance: Stream
 public void AbortWriteIfAbortIsCalled() {
     var transmission = new Transmission(TransmissionType.DOWNLOAD_MODIFIED_FILE, "path");
     using (var inputStream = new MemoryStream(new byte[1024 * 1024 * 10]))
     using (var stream = new Mock<MemoryStream>() { CallBase = true }.Object)
     using (var underTest = new TransmissionStream(stream, transmission)) {
         transmission.Abort();
         Assert.Throws<AbortException>(() => inputStream.CopyTo(underTest));
         Mock.Get(stream).Verify(s => s.WriteByte(It.IsAny<byte>()), Times.Never());
         Mock.Get(stream).Verify(s => s.Write(It.IsAny<byte[]>(), It.IsAny<int>(), It.IsAny<int>()), Times.Never());
     }
 }
 public void AbortReadIfAbortIsCalled() {
     var transmission = new Transmission(TransmissionType.DOWNLOAD_MODIFIED_FILE, "path");
     byte[] content = new byte[1024];
     using (var outputStream = new MemoryStream())
     using (var stream = new Mock<MemoryStream>() { CallBase = true }.Object)
     using (var underTest = new TransmissionStream(stream, transmission)) {
         transmission.Abort();
         Assert.Throws<AbortException>(() => underTest.CopyTo(outputStream));
         Mock.Get(stream).Verify(s => s.ReadByte(), Times.Never());
         Mock.Get(stream).Verify(s => s.Read(It.IsAny<byte[]>(), It.IsAny<int>(), It.IsAny<int>()), Times.Never());
     }
 }
 public void ConstructorTakesTransmissionAndStream() {
     var transmission = new Transmission(TransmissionType.DOWNLOAD_MODIFIED_FILE, "path");
     using (var stream = new MemoryStream())
     using (var underTest = new TransmissionStream(stream, transmission)) {
     }
 }