This PR removes the "Flush()" call from the FlushIfBufferThresholdReached method and renames the method to DrainBufferIfThresholdReached. This method no longer forces a flush of the underlying stream, instead it only writes to the stream but leaves the stream to decide whether/when to flush. The user can still force a flush by explicitly calling the Flush() method.
Checklist (Uncheck if it is not completed)
[x] Test cases added
[x] Build and test with one-click build and test script passed
Issues
This pull request fixes #3099 .
This PR is an 8.x port of the following 7.x PR: https://github.com/OData/odata.net/pull/3101
Description
This PR removes the "Flush()" call from the
FlushIfBufferThresholdReached
method and renames the method toDrainBufferIfThresholdReached
. This method no longer forces a flush of the underlying stream, instead it only writes to the stream but leaves the stream to decide whether/when to flush. The user can still force a flush by explicitly calling theFlush()
method.Checklist (Uncheck if it is not completed)