9 writes to _buffer
System.Reflection.Metadata (9)
System\Reflection\Metadata\BlobBuilder.cs (9)
63
_buffer
= new byte[Math.Max(MinChunkSize, capacity)];
91
first.
_buffer
= _buffer;
92
_buffer
= firstBuffer;
470
suffix.
_buffer
= _buffer;
472
_buffer
= suffixBuffer;
546
newChunk.
_buffer
= _buffer;
547
_buffer
= newBuffer;
567
newChunk.
_buffer
= _buffer;
571
_buffer
= newBuffer;
40 references to _buffer
System.Reflection.Metadata (40)
System\Reflection\Metadata\BlobBuilder.cs (39)
53
private Span<byte> Span =>
_buffer
.AsSpan(0, Length);
68
return new BlobBuilder(Math.Max(
_buffer
.Length, minimalSize));
89
var firstBuffer = first.
_buffer
;
91
first._buffer =
_buffer
;
124
Debug.Assert(
_buffer
!= null);
125
Debug.Assert(Length >= 0 && Length <=
_buffer
.Length);
160
protected int FreeBytes =>
_buffer
.Length - Length;
163
protected internal int ChunkCapacity =>
_buffer
.Length;
237
if (!left.
_buffer
.AsSpan(leftStart, minLength).SequenceEqual(right.
_buffer
.AsSpan(rightStart, minLength)))
290
Array.Copy(chunk.
_buffer
, bufferStart - chunkStart, result, bufferStart - start, bytesToCopy);
345
destination.Write(chunk.
_buffer
, 0, chunk.Length);
466
var suffixBuffer = suffix.
_buffer
;
470
suffix._buffer =
_buffer
;
541
var newBuffer = newChunk.
_buffer
;
546
newChunk._buffer =
_buffer
;
567
newChunk._buffer =
_buffer
;
592
return new Blob(
_buffer
, start, byteCount);
602
if (result >
_buffer
.Length - byteCount)
636
_buffer
.WriteBytes(Length, value, bytesToCurrent);
644
_buffer
.WriteBytes(0, value, remaining);
676
buffer.Slice(0, bytesToCurrent).CopyTo(
_buffer
.AsSpan(Length));
685
remaining.CopyTo(
_buffer
);
716
bytesRead = source.TryReadAll(
_buffer
, Length, bytesToCurrent);
729
bytesRead = 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);
1169
string.Join("->", GetChunks().Select(chunk => $"[{Display(chunk.
_buffer
, chunk.Length)}]")) :
1170
$"<{Display(
_buffer
, Length)}>";
System\Reflection\Metadata\BlobBuilder.Enumerators.cs (1)
82
return new Blob(current.
_buffer
, 0, current.Length);