StreamPipeExtensions Class

Definition

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Provides extension methods for Stream that support read and write operations directly into pipes.

C#
public static class StreamPipeExtensions
Inheritance
StreamPipeExtensions

Methods

CopyToAsync(Stream, PipeWriter, CancellationToken)

Asynchronously reads the bytes from the Stream and writes them to the specified PipeWriter, using a cancellation token.

Applies to

产品 版本
.NET 8 (package-provided), 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)