When calling ReadOnlySequence<T>.TryGet(ref position, out memory) with a position of sequence.End or sequence.GetPosition(size) the result is true and memory is an empty slice. As this effectively is not returning a segment or byte, is should probably return false.
As per this comment from @pakrym, I'm raising as a seperate issue.
When calling
ReadOnlySequence<T>.TryGet(ref position, out memory)with a position ofsequence.Endorsequence.GetPosition(size)the result istrueandmemoryis an empty slice. As this effectively is not returning a segment or byte, is should probably returnfalse.As per this comment from @pakrym, I'm raising as a seperate issue.