3 writes to _buffer
System.Formats.Cbor (3)
System\Formats\Cbor\Writer\CborWriter.cs (3)
92
_buffer
= initialCapacity > 0 ? new byte[initialCapacity] : Array.Empty<byte>();
132
_buffer
= initialCapacity switch
296
_buffer
= newBuffer;
25 references to _buffer
System.Formats.Cbor (25)
System\Formats\Cbor\Writer\CborWriter.Array.cs (2)
84
ReadOnlySpan<byte> elementEncoding =
_buffer
.AsSpan(_frameOffset, currentOffset - _frameOffset);
85
Span<byte> target =
_buffer
.AsSpan(_frameOffset + bytesToShift, currentOffset - _frameOffset);
System\Formats\Cbor\Writer\CborWriter.cs (7)
145
Array.Clear(
_buffer
, 0, _offset);
185
encodedValue.CopyTo(
_buffer
.AsSpan(_offset));
274
return new ReadOnlySpan<byte>(
_buffer
, 0, _offset);
284
int currentCapacity =
_buffer
.Length;
295
new ReadOnlySpan<byte>(
_buffer
, 0, _offset).CopyTo(newBuffer);
437
_buffer
[_offset++] = initialByte.InitialByte;
469
_buffer
[_offset++] = CborInitialByte.IndefiniteLengthBreakByte;
System\Formats\Cbor\Writer\CborWriter.Integer.cs (4)
96
_buffer
[_offset++] = (byte)value;
102
BinaryPrimitives.WriteUInt16BigEndian(
_buffer
.AsSpan(_offset), (ushort)value);
109
BinaryPrimitives.WriteUInt32BigEndian(
_buffer
.AsSpan(_offset), (uint)value);
116
BinaryPrimitives.WriteUInt64BigEndian(
_buffer
.AsSpan(_offset), value);
System\Formats\Cbor\Writer\CborWriter.Map.cs (4)
108
_buffer
.AsSpan(currentKey.Offset, _offset).Clear();
161
Span<byte> source =
_buffer
.AsSpan();
274
return _writer.
_buffer
.AsSpan(range.Offset, range.Length);
279
return _writer.
_buffer
.AsSpan(range.Offset, range.KeyLength);
System\Formats\Cbor\Writer\CborWriter.Simple.cs (3)
66
CborHelpers.WriteSingleBigEndian(
_buffer
.AsSpan(_offset), value);
75
CborHelpers.WriteDoubleBigEndian(
_buffer
.AsSpan(_offset), value);
127
_buffer
[_offset++] = (byte)value;
System\Formats\Cbor\Writer\CborWriter.Simple.netcoreapp.cs (2)
26
BinaryPrimitives.WriteUInt16BigEndian(
_buffer
.AsSpan(_offset), PositiveQNaNBitsHalf);
30
BinaryPrimitives.WriteHalfBigEndian(
_buffer
.AsSpan(_offset), value);
System\Formats\Cbor\Writer\CborWriter.String.cs (3)
53
value.CopyTo(
_buffer
.AsSpan(_offset));
149
utf8Encoding.GetBytes(value,
_buffer
.AsSpan(_offset, length));
210
Span<byte> buffer =
_buffer
.AsSpan();