PipeWriter.Create(Stream, StreamPipeWriterOptions) Method

Definition

Creates a PipeWriter wrapping the specified Stream.

C#
public static System.IO.Pipelines.PipeWriter Create(System.IO.Stream stream, System.IO.Pipelines.StreamPipeWriterOptions? writerOptions = default);

Parameters

stream
Stream

The stream that the pipe writer will wrap.

writerOptions
StreamPipeWriterOptions

The options to configure the pipe writer.

Returns

A PipeWriter that wraps the Stream.

Applies to

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