Document caution regarding AdvanceTo's side effect (#691)
authorAndrew Arnott <Andrew.arnott@Microsoft.com>
Wed, 11 Dec 2019 14:46:29 +0000 (07:46 -0700)
committerStephen Toub <stoub@microsoft.com>
Wed, 11 Dec 2019 14:46:29 +0000 (09:46 -0500)
commit53add50015c13ec87bd5f8298d2e987cd2ea7397
treef3faa6c2788363baf26a27023606c965499aa1a7
parent5d4304e04d6a8b0ff34d4f4ef9c97b8d483f3bb8
Document caution regarding AdvanceTo's side effect (#691)

After calling `PipeReader.AdvanceTo`, the `ReadResult.Buffer` property's backing data is recycled, leading to indeterministic changes to not only the content but its `Length` property. This isn't particular predictable as a consumer and the docs didn't make it clear either.
src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs