From c8c5686bc8aa9952ae7b4c081d8d8080d2b51692 Mon Sep 17 00:00:00 2001 From: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com> Date: Wed, 24 Aug 2022 16:47:47 -1000 Subject: [PATCH] what's new update --- aspnetcore/release-notes/aspnetcore-7.0.md | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/aspnetcore/release-notes/aspnetcore-7.0.md b/aspnetcore/release-notes/aspnetcore-7.0.md index 6f385dec44..7e095ab97b 100644 --- a/aspnetcore/release-notes/aspnetcore-7.0.md +++ b/aspnetcore/release-notes/aspnetcore-7.0.md @@ -108,23 +108,7 @@ The request body can bind as a [`Stream`](/dotnet/api/system.io.stream) or [`Pip For example, the data might be enqueued to [Azure Queue storage](/azure/storage/queues/storage-queues-introduction) or stored in [Azure Blob storage](/azure/storage/blobs/storage-blobs-introduction). -The following code implements a background queue: - -[!code-csharp[](~/fundamentals/minimal-apis/bindStreamPipeReader/7.0-samples/PipeStreamToBackgroundQueue/BackgroundQueueService.cs)] - -The following code binds the request body to a `Stream`: - -[!code-csharp[](~/fundamentals/minimal-apis/bindStreamPipeReader/7.0-samples/PipeStreamToBackgroundQueue/Program.cs?name=snippet_1)] - -The following code shows the complete `Program.cs` file: - -[!code-csharp[](~/fundamentals/minimal-apis/bindStreamPipeReader/7.0-samples/PipeStreamToBackgroundQueue/Program.cs?name=snippet)] - -Limitations when binding request body to `Stream` or `PipeReader`: - -* When reading data, the `Stream` is the same object as `HttpRequest.Body`. -* The request body isn't buffered by default. After the body is read, it's not rewindable. The stream can't be read multiple times. -* The `Stream` and `PipeReader` aren't usable outside of the minimal action handler as the underlying buffers will be disposed or reused. +For more information, see [Bind the request body as a `Stream` or `PipeReader`](xref:fundamentals/minimal-apis#rbs) ### New Results.Stream overloads