public void Append(BytesSegment next) { Debug.Assert(Next == null); next.First = First; next.Next = null; next.RunningIndex = RunningIndex + Length; Next = next; }
internal static void ReturnAll(BytesSegment item) { var current = item.First; ReadOnlySequenceSegment <byte> next; while (current != null) { next = current.Next; ReturnOne(current); current = (BytesSegment)next; } }
internal static void ReturnOne(BytesSegment item) { item.First = null; item.Next = null; buffers.Free(item); }