19 writes to _offset
System.Formats.Cbor (19)
System\Formats\Cbor\Writer\CborWriter.Array.cs (2)
88_offset = _frameOffset - 1; 90_offset = currentOffset + bytesToShift;
System\Formats\Cbor\Writer\CborWriter.cs (4)
110_offset = 0; 148_offset += encodedValue.Length; 385_buffer[_offset++] = initialByte.InitialByte; 417_buffer[_offset++] = CborInitialByte.IndefiniteLengthBreakByte;
System\Formats\Cbor\Writer\CborWriter.Integer.cs (4)
96_buffer[_offset++] = (byte)value; 103_offset += sizeof(ushort); 110_offset += sizeof(uint); 117_offset += sizeof(ulong);
System\Formats\Cbor\Writer\CborWriter.Map.cs (1)
107_offset = currentKey.Offset;
System\Formats\Cbor\Writer\CborWriter.Simple.cs (3)
67_offset += sizeof(float); 76_offset += sizeof(double); 127_buffer[_offset++] = (byte)value;
System\Formats\Cbor\Writer\CborWriter.Simple.netcoreapp.cs (1)
32_offset += sizeof(short);
System\Formats\Cbor\Writer\CborWriter.String.cs (4)
57_offset += value.Length; 154_offset += length; 227_offset = _frameOffset - 1; 230_offset += definiteLength;
32 references to _offset
System.Formats.Cbor (32)
System\Formats\Cbor\Writer\CborWriter.Array.cs (1)
74int currentOffset = _offset;
System\Formats\Cbor\Writer\CborWriter.cs (8)
53public int BytesWritten => _offset; 106if (_offset > 0) 108Array.Clear(_buffer, 0, _offset); 147encodedValue.CopyTo(_buffer.AsSpan(_offset)); 228return new ReadOnlySpan<byte>(_buffer, 0, _offset); 239int requiredCapacity = _offset + pendingCount; 253new ReadOnlySpan<byte>(_buffer, 0, _offset).CopyTo(newBuffer); 277_frameOffset = _offset;
System\Formats\Cbor\Writer\CborWriter.Integer.cs (3)
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 (8)
73_currentKeyOffset = _offset; 86_currentKeyOffset = _offset; 101(int Offset, int Length) currentKey = (_currentKeyOffset.Value, _offset - _currentKeyOffset.Value); 106_buffer.AsSpan(currentKey.Offset, _offset).Clear(); 114_currentValueOffset = _offset; 128totalLength: _offset - _currentKeyOffset.Value); 144_currentKeyOffset = _offset; 158int totalMapPayloadEncodingLength = _offset - _frameOffset;
System\Formats\Cbor\Writer\CborWriter.Simple.cs (2)
66CborHelpers.WriteSingleBigEndian(_buffer.AsSpan(_offset), value); 75CborHelpers.WriteDoubleBigEndian(_buffer.AsSpan(_offset), 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 (8)
53_currentIndefiniteLengthStringRanges.Add((_offset, value.Length)); 56value.CopyTo(_buffer.AsSpan(_offset)); 150_currentIndefiniteLengthStringRanges.Add((_offset, value.Length)); 153CborHelpers.GetBytes(utf8Encoding, value, _buffer.AsSpan(_offset, length)); 203int initialOffset = _offset; 229tempSpan.CopyTo(buffer.Slice(_offset, definiteLength)); 235buffer.Slice(_offset, initialOffset - _offset).Clear();