diff --git a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs index 52a5a3caff92b..5c1beb95c6b9a 100644 --- a/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs +++ b/src/libraries/System.IO.Pipelines/src/System/IO/Pipelines/PipeReader.cs @@ -15,7 +15,15 @@ public abstract partial class PipeReader /// Attempts to synchronously read data from the . /// When this method returns , this value is set to a instance that represents the result of the read call; otherwise, this value is set to . /// if data was available, or if the call was canceled or the writer was completed; otherwise, . - /// If the pipe returns , there is no need to call . + /// , there is no need to call . + /// [!IMPORTANT] + /// The `System.IO.Pipelines.PipeReader` implementation returned by `System.IO.Pipelines.PipeReader.Create(System.IO.Stream, System.IO.Pipelines.StreamPipeReaderOptions?)` + /// will not read new data from the backing `System.IO.Stream` when `System.IO.Pipelines.PipeReader.TryRead(out System.IO.Pipelines.ReadResult)` is called. + /// + /// `System.IO.Pipelines.PipeReader.ReadAsync(System.Threading.CancellationToken)` must be called to read new data from the backing `System.IO.Stream`. + /// Any unconsumed data from a previous asynchronous read will be available to `System.IO.Pipelines.PipeReader.TryRead(out System.IO.Pipelines.ReadResult)`. + /// ]]> public abstract bool TryRead(out ReadResult result); /// Asynchronously reads a sequence of bytes from the current .