Address code review: ProgressReportingStream now throws on writes

Co-authored-by: adamhathcock <527620+adamhathcock@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-11-27 19:17:10 +00:00
parent 0d487df61b
commit 0f374b27cf

View File

@@ -38,7 +38,7 @@ internal sealed class ProgressReportingStream : Stream
public override bool CanSeek => _baseStream.CanSeek;
public override bool CanWrite => _baseStream.CanWrite;
public override bool CanWrite => false;
public override long Length => _baseStream.Length;
@@ -122,7 +122,9 @@ internal sealed class ProgressReportingStream : Stream
public override void SetLength(long value) => _baseStream.SetLength(value);
public override void Write(byte[] buffer, int offset, int count) =>
_baseStream.Write(buffer, offset, count);
throw new NotSupportedException(
"ProgressReportingStream is designed for read operations to track compression progress."
);
private void ReportProgress()
{