dotnet/runtime

ReadOnlySequence<T>.TryGet() returns empty result

Open

#27.769 aberto em 30 de out. de 2018

Ver no GitHub
 (7 comments) (0 reactions) (0 assignees)C# (5.445 forks)batch import
area-System.Memorybughelp wanted

Métricas do repositório

Stars
 (17.886 stars)
Métricas de merge de PR
 (Mesclagem média 12d 11h) (661 fundiu PRs em 30d)

Description

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.

Guia do colaborador