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.
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 aleaveOpen= 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 betweenSqlGeography
andNTS
land and it would be nice to not have to write a crappy dummyStreamWrapper
just to avoid this disposal.