rexcardan / Evil-DICOM

A C# DICOM Library
171 stars 98 forks source link

DICOMBinaryWriter closes stream on Dispose #53

Closed Dbugrov closed 6 years ago

Dbugrov commented 6 years ago

Since DICOMBinaryWriter closes stream on Dispose it's hard to use it with MemoryStream i want to write Dicom file in one class and read the result in other. In order to make it possible one more cstor could be added to DICOMBinaryWriter public DICOMBinaryWriter(Stream stream, bool leaveOpen) { this._writer = new BinaryWriter(stream, Encoding.UTF8, leaveOpen); } (since BinaryWriter supports such behavior )

rexcardan commented 6 years ago

Why don't you just add a class that does what you need? I am not sure its a big enough request to implement.