2 writes to _buffer
System.Formats.Cbor (2)
System\Formats\Cbor\Writer\CborWriter.cs (2)
95_buffer = initialCapacity switch 254_buffer = newBuffer;
25 references to _buffer
System.Formats.Cbor (25)
System\Formats\Cbor\Writer\CborWriter.Array.cs (2)
82ReadOnlySpan<byte> elementEncoding = _buffer.AsSpan(_frameOffset, currentOffset - _frameOffset); 83Span<byte> target = _buffer.AsSpan(_frameOffset + bytesToShift, currentOffset - _frameOffset);
System\Formats\Cbor\Writer\CborWriter.cs (7)
108Array.Clear(_buffer, 0, _offset); 147encodedValue.CopyTo(_buffer.AsSpan(_offset)); 228return new ReadOnlySpan<byte>(_buffer, 0, _offset); 238int currentCapacity = _buffer.Length; 253new ReadOnlySpan<byte>(_buffer, 0, _offset).CopyTo(newBuffer); 385_buffer[_offset++] = initialByte.InitialByte; 417_buffer[_offset++] = CborInitialByte.IndefiniteLengthBreakByte;
System\Formats\Cbor\Writer\CborWriter.Integer.cs (4)
96_buffer[_offset++] = (byte)value; 102BinaryPrimitives.WriteUInt16BigEndian(_buffer.AsSpan(_offset), (ushort)value); 109BinaryPrimitives.WriteUInt32BigEndian(_buffer.AsSpan(_offset), (uint)value); 116BinaryPrimitives.WriteUInt64BigEndian(_buffer.AsSpan(_offset), value);
System\Formats\Cbor\Writer\CborWriter.Map.cs (4)
106_buffer.AsSpan(currentKey.Offset, _offset).Clear(); 159Span<byte> source = _buffer.AsSpan(); 272return _writer._buffer.AsSpan(range.Offset, range.Length); 277return _writer._buffer.AsSpan(range.Offset, range.KeyLength);
System\Formats\Cbor\Writer\CborWriter.Simple.cs (3)
66CborHelpers.WriteSingleBigEndian(_buffer.AsSpan(_offset), value); 75CborHelpers.WriteDoubleBigEndian(_buffer.AsSpan(_offset), value); 127_buffer[_offset++] = (byte)value;
System\Formats\Cbor\Writer\CborWriter.Simple.netcoreapp.cs (2)
26BinaryPrimitives.WriteUInt16BigEndian(_buffer.AsSpan(_offset), PositiveQNaNBitsHalf); 30BinaryPrimitives.WriteHalfBigEndian(_buffer.AsSpan(_offset), value);
System\Formats\Cbor\Writer\CborWriter.String.cs (3)
56value.CopyTo(_buffer.AsSpan(_offset)); 153CborHelpers.GetBytes(utf8Encoding, value, _buffer.AsSpan(_offset, length)); 212Span<byte> buffer = _buffer.AsSpan();