1 instantiation of DbRow
System.Text.Json (1)
System\Text\Json\Document\JsonDocument.MetadataDb.cs (1)
228DbRow row = new DbRow(tokenType, startLocation, length);
92 references to DbRow
System.Text.Json (92)
System\Text\Json\Document\JsonDocument.cs (50)
125int matchIndex = isPropertyName ? index - DbRow.Size : index; 126DbRow row = _parsedData.Get(matchIndex); 136DbRow row = _parsedData.Get(index); 147DbRow row = _parsedData.Get(index); 158DbRow row = _parsedData.Get(currentIndex); 174return new JsonElement(this, currentIndex + ((arrayIndex + 1) * DbRow.Size)); 178int objectOffset = currentIndex + DbRow.Size; 180for (; objectOffset < _parsedData.Length; objectOffset += DbRow.Size) 191objectOffset += DbRow.Size * row.NumberOfRows; 206DbRow row = _parsedData.Get(index); 210return index + DbRow.Size; 213int endIndex = index + DbRow.Size * row.NumberOfRows; 217endIndex += DbRow.Size; 232DbRow row = _parsedData.Get(index); 257DbRow row = _parsedData.Get(valueIndex - DbRow.Size); 289DbRow row = _parsedData.Get(index); 345int matchIndex = isPropertyName ? index - DbRow.Size : index; 347DbRow row = _parsedData.Get(matchIndex); 385return GetString(index - DbRow.Size, JsonTokenType.PropertyName)!; 392DbRow row = _parsedData.Get(index - DbRow.Size); 402DbRow row = _parsedData.Get(index); 423DbRow row = _parsedData.Get(index); 445DbRow row = _parsedData.Get(index); 467DbRow row = _parsedData.Get(index); 489DbRow row = _parsedData.Get(index); 511DbRow row = _parsedData.Get(index); 533DbRow row = _parsedData.Get(index); 555DbRow row = _parsedData.Get(index); 577DbRow row = _parsedData.Get(index); 599DbRow row = _parsedData.Get(index); 621DbRow row = _parsedData.Get(index); 643DbRow row = _parsedData.Get(index); 665DbRow row = _parsedData.Get(index); 700DbRow row = _parsedData.Get(index); 735DbRow row = _parsedData.Get(index); 802DbRow row = _parsedData.Get(index); 838for (int i = index + DbRow.Size; i < endIndex; i += DbRow.Size) 840DbRow row = _parsedData.Get(i); 881private ReadOnlySpan<byte> UnescapeString(in DbRow row, out ArraySegment<byte> rented) 913DbRow row = _parsedData.Get(index - DbRow.Size); 918private void WritePropertyName(in DbRow row, Utf8JsonWriter writer) 932private void WriteString(in DbRow row, Utf8JsonWriter writer) 979database.Append(tokenType, tokenStart, DbRow.UnknownSize); 1010database.Append(tokenType, tokenStart, DbRow.UnknownSize); 1061database.SetHasComplexChildren(database.Length - DbRow.Size); 1086database.SetHasComplexChildren(database.Length - DbRow.Size);
System\Text\Json\Document\JsonDocument.DbRow.cs (1)
57Debug.Assert(sizeof(DbRow) == Size);
System\Text\Json\Document\JsonDocument.MetadataDb.cs (20)
126int initialSize = payloadLength + DbRow.Size; 145int size = payloadLength + DbRow.Size; 221(length == DbRow.UnknownSize)); 223if (Length >= _data.Length - DbRow.Size) 228DbRow row = new DbRow(tokenType, startLocation, length); 230Length += DbRow.Size; 270Debug.Assert(index <= Length - DbRow.Size, $"index {index} is out of bounds"); 271Debug.Assert(index % DbRow.Size == 0, $"index {index} is not at a record start position"); 317for (int i = Length - DbRow.Size; i >= 0; i -= DbRow.Size) 319DbRow row = MemoryMarshal.Read<DbRow>(data.Slice(i)); 332internal DbRow Get(int index) 335return MemoryMarshal.Read<DbRow>(_data.AsSpan(index)); 355DbRow start = Get(startIndex); 357DbRow end = Get(endIndex - DbRow.Size); 374startIndex + DbRow.Size == endIndex, 393for (int i = (length - DbRow.Size) / sizeof(int); i >= 0; i -= DbRow.Size / sizeof(int))
System\Text\Json\Document\JsonDocument.TryGetProperty.cs (18)
15DbRow row = _parsedData.Get(index); 27int startIndex = index + DbRow.Size; 28int endIndex = checked(row.NumberOfRows * DbRow.Size + index); 52int candidateIndex = endIndex - DbRow.Size; 64candidateIndex -= DbRow.Size; 69candidateIndex -= DbRow.Size * (row.NumberOfRows + 1); 87passedIndex + DbRow.Size, 103candidateIndex -= DbRow.Size; 115DbRow row = _parsedData.Get(index); 126int endIndex = checked(row.NumberOfRows * DbRow.Size + index); 129index + DbRow.Size, 145int index = endIndex - DbRow.Size; 149DbRow row = _parsedData.Get(index); 155index -= DbRow.Size; 160index -= DbRow.Size * (row.NumberOfRows + 1); 198value = new JsonElement(this, index + DbRow.Size); 216value = new JsonElement(this, index + DbRow.Size); 221index -= DbRow.Size;
System\Text\Json\Document\JsonElement.ArrayEnumerator.cs (1)
91_curIdx = _target._idx + JsonDocument.DbRow.Size;
System\Text\Json\Document\JsonElement.ObjectEnumerator.cs (2)
96_curIdx = _target._idx + JsonDocument.DbRow.Size; 104_curIdx += JsonDocument.DbRow.Size;