StreamPipeExtensions Class

Definition

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)