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.

貢獻者指南