dotnet/runtime

ReadOnlySequence<T>.TryGet() returns empty result

开放

#27,769 创建于 2018年10月30日

 (7 条评论) (0 个反应) (0 位负责人)C# (5,445 个派生)batch import
area-System.Memorybughelp wanted

仓库指标

星标
 (17,886 个星标)
PR 合并指标
 (平均合并 12天 11小时) (30 天内合并 661 个 PR)

描述

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.

贡献者指南