Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ WriteLiteralMinimized() [3/3]

void System.Text.Json.Utf8JsonWriter.WriteLiteralMinimized ( ReadOnlySpan< char > escapedPropertyName,
ReadOnlySpan< byte > value )
inlineprivate

Definition at line 2512 of file Utf8JsonWriter.cs.

2513 {
2514 int num = escapedPropertyName.Length * 3 + value.Length + 4;
2515 if (_memory.Length - BytesPending < num)
2516 {
2517 Grow(num);
2518 }
2519 Span<byte> span = _memory.Span;
2520 if (_currentDepth < 0)
2521 {
2522 span[BytesPending++] = 44;
2523 }
2524 span[BytesPending++] = 34;
2526 span[BytesPending++] = 34;
2527 span[BytesPending++] = 58;
2528 value.CopyTo(span.Slice(BytesPending));
2529 BytesPending += value.Length;
2530 }
void Grow(int requiredSize)
void TranscodeAndWrite(ReadOnlySpan< char > escapedPropertyName, Span< byte > output)
unsafe Span< T > Span
Definition Memory.cs:28

References System.Text.Json.Utf8JsonWriter._currentDepth, System.Text.Json.Utf8JsonWriter._memory, System.Text.Json.Utf8JsonWriter.BytesPending, System.Text.Json.Dictionary, System.Text.Json.Utf8JsonWriter.Grow(), System.Memory< T >.Length, System.Memory< T >.Span, System.Text.Json.Utf8JsonWriter.TranscodeAndWrite(), and System.value.

Referenced by System.Text.Json.Utf8JsonWriter.WriteLiteralByOptions(), System.Text.Json.Utf8JsonWriter.WriteLiteralByOptions(), and System.Text.Json.Utf8JsonWriter.WriteLiteralByOptions().