Skip to content

Commit a3b1423

Browse files
committed
Fix error CA2213, field _underlyingStream was not being disposed
1 parent 79264e1 commit a3b1423

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/PowerShellEditorServices.Test.E2E/Processes/LoggingStream.cs

+9
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@ internal class LoggingStream : Stream
1616

1717
public LoggingStream(Stream underlyingStream) => _underlyingStream = underlyingStream;
1818

19+
protected override void Dispose(bool disposing)
20+
{
21+
base.Dispose(disposing);
22+
if (disposing)
23+
{
24+
_underlyingStream.Dispose();
25+
}
26+
}
27+
1928
public override bool CanRead => _underlyingStream.CanRead;
2029

2130
public override bool CanSeek => _underlyingStream.CanSeek;

0 commit comments

Comments
 (0)