NetTopologySuite / NetTopologySuite.IO.SqlServerBytes

A SQL Server IO module for NTS which works directly with the serialization format
BSD 3-Clause "New" or "Revised" License
16 stars 12 forks source link

Consider adding a closeStream to the `Read` and `Write` methods #32

Open mburbea opened 7 months ago

mburbea commented 7 months ago

Currently, SqlServerByteReader.Read(Stream)/SqlServerByteWriter.Write(Geometry, Stream) will close the underlying stream. It would be nice to have an option to reuse the stream. I propose adding a leaveOpen= false parameter to each of these methods, and we can just manually turn it true to leave the passed in stream open. I currently have a need to marshall data back and forth between SqlGeography and NTS land and it would be nice to not have to write a crappy dummy StreamWrapper just to avoid this disposal.