4 writes to Length
System.Text.Json (4)
System\Text\Json\Document\JsonDocument.MetadataDb.cs (4)
107Length = 0; 115Length = completeDb.Length; 165Length = 0; 230Length += DbRow.Size;
15 references to Length
System.Text.Json (15)
System\Text\Json\Document\JsonDocument.cs (5)
180for (; objectOffset < _parsedData.Length; objectOffset += DbRow.Size) 993int newRowIndex = database.Length; 1040int newRowIndex = database.Length; 1061database.SetHasComplexChildren(database.Length - DbRow.Size); 1086database.SetHasComplexChildren(database.Length - DbRow.Size);
System\Text\Json\Document\JsonDocument.MetadataDb.cs (10)
180_data = _data.AsSpan(0, Length).ToArray(); 195if (Length <= _data.Length / 2) 197byte[] newRent = ArrayPool<byte>.Shared.Rent(Length); 202Buffer.BlockCopy(_data, 0, newRent, 0, Length); 223if (Length >= _data.Length - DbRow.Size) 229MemoryMarshal.Write(_data.AsSpan(Length), ref row); 270Debug.Assert(index <= Length - DbRow.Size, $"index {index} is out of bounds"); 315Span<byte> data = _data.AsSpan(0, Length); 317for (int i = Length - DbRow.Size; i >= 0; i -= DbRow.Size) 353Debug.Assert(endIndex <= Length);