PipeWriter.OnReaderCompleted(Action<Exception,Object>, Object) Method

Definition

Caution

OnReaderCompleted has been deprecated and may not be invoked on all implementations of PipeWriter.

Registers a callback that executes when the PipeReader side of the pipe is completed.

C#
[System.Obsolete("OnReaderCompleted has been deprecated and may not be invoked on all implementations of PipeWriter.")]
public virtual void OnReaderCompleted(Action<Exception?,object?> callback, object? state);

Parameters

callback
Action<Exception,Object>

The callback to register.

state
Object

The state object to pass to callback when it's invoked.

Attributes

Remarks

重要

OnReaderCompleted may not be invoked on all implementations of PipeWriter. This method will be removed in a future release.

Applies to

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