9 writes to _buffer
System.Reflection.Metadata (9)
System\Reflection\Metadata\BlobBuilder.cs (9)
63_buffer = new byte[Math.Max(MinChunkSize, capacity)]; 91first._buffer = _buffer; 92_buffer = firstBuffer; 470suffix._buffer = _buffer; 472_buffer = suffixBuffer; 546newChunk._buffer = _buffer; 547_buffer = newBuffer; 567newChunk._buffer = _buffer; 571_buffer = newBuffer;
40 references to _buffer
System.Reflection.Metadata (40)
System\Reflection\Metadata\BlobBuilder.cs (39)
53private Span<byte> Span => _buffer.AsSpan(0, Length); 68return new BlobBuilder(Math.Max(_buffer.Length, minimalSize)); 89var firstBuffer = first._buffer; 91first._buffer = _buffer; 124Debug.Assert(_buffer != null); 125Debug.Assert(Length >= 0 && Length <= _buffer.Length); 160protected int FreeBytes => _buffer.Length - Length; 163protected internal int ChunkCapacity => _buffer.Length; 237if (!left._buffer.AsSpan(leftStart, minLength).SequenceEqual(right._buffer.AsSpan(rightStart, minLength))) 290Array.Copy(chunk._buffer, bufferStart - chunkStart, result, bufferStart - start, bytesToCopy); 345destination.Write(chunk._buffer, 0, chunk.Length); 466var suffixBuffer = suffix._buffer; 470suffix._buffer = _buffer; 541var newBuffer = newChunk._buffer; 546newChunk._buffer = _buffer; 567newChunk._buffer = _buffer; 592return new Blob(_buffer, start, byteCount); 602if (result > _buffer.Length - byteCount) 636_buffer.WriteBytes(Length, value, bytesToCurrent); 644_buffer.WriteBytes(0, value, remaining); 676buffer.Slice(0, bytesToCurrent).CopyTo(_buffer.AsSpan(Length)); 685remaining.CopyTo(_buffer); 716bytesRead = source.TryReadAll(_buffer, Length, bytesToCurrent); 729bytesRead = source.TryReadAll(_buffer, 0, remaining); 825_buffer.WriteByte(start, value); 838_buffer.WriteDouble(start, value); 845_buffer.WriteSingle(start, value); 858_buffer.WriteUInt16(start, value); 871_buffer.WriteUInt16BE(start, value); 884_buffer.WriteUInt32BE(start, value); 897_buffer.WriteUInt32(start, value); 910_buffer.WriteUInt64(start, value); 917_buffer.WriteDecimal(start, value); 924_buffer.WriteGuid(start, value); 1104_buffer.WriteUTF8(Length, currentPtr, charsToCurrent, bytesToCurrent, allowUnpairedSurrogates); 1111_buffer.WriteUTF8(0, nextPtr, charsToNext, bytesToNext, allowUnpairedSurrogates); 1169string.Join("->", GetChunks().Select(chunk => $"[{Display(chunk._buffer, chunk.Length)}]")) : 1170$"<{Display(_buffer, Length)}>";
System\Reflection\Metadata\BlobBuilder.Enumerators.cs (1)
82return new Blob(current._buffer, 0, current.Length);