<PackageReference Include="System.IO.Pipelines" Version="10.0.0-preview.5.25277.114" />

ReadResult

public struct ReadResult
Represents the result of a ReadAsync call.
public ReadOnlySequence<byte> Buffer { get; }

Gets the ReadOnlySequence<T> that was read.

public bool IsCanceled { get; }

Gets a value that indicates whether the current ReadAsync operation was canceled by CancelPendingRead.

public bool IsCompleted { get; }

Gets a value that indicates whether the end of the data stream has been reached.

public ReadResult(ReadOnlySequence<byte> buffer, bool isCanceled, bool isCompleted)

Creates a new instance of ReadResult setting IsCanceled and IsCompleted flags.