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

◆ WriteStringIndented() [11/12]

void System.Text.Json.Utf8JsonWriter.WriteStringIndented ( ReadOnlySpan< char > escapedPropertyName,
ReadOnlySpan< char > escapedValue )
inlineprivate

Definition at line 3793 of file Utf8JsonWriter.cs.

3794 {
3796 int num = indentation + (escapedPropertyName.Length + escapedValue.Length) * 3 + 7 + s_newLineLength;
3797 if (_memory.Length - BytesPending < num)
3798 {
3799 Grow(num);
3800 }
3801 Span<byte> span = _memory.Span;
3802 if (_currentDepth < 0)
3803 {
3804 span[BytesPending++] = 44;
3805 }
3806 if (_tokenType != 0)
3807 {
3809 }
3810 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
3812 span[BytesPending++] = 34;
3814 span[BytesPending++] = 34;
3815 span[BytesPending++] = 58;
3816 span[BytesPending++] = 32;
3817 span[BytesPending++] = 34;
3819 span[BytesPending++] = 34;
3820 }
static readonly int s_newLineLength
void Grow(int requiredSize)
void WriteNewLine(Span< byte > output)
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._tokenType, System.Text.Json.Utf8JsonWriter.BytesPending, System.Text.Json.Dictionary, System.Text.Json.Utf8JsonWriter.Grow(), System.Text.Json.Utf8JsonWriter.Indentation, System.Memory< T >.Length, System.Text.Json.Utf8JsonWriter.s_newLineLength, System.Memory< T >.Span, System.Text.Json.Utf8JsonWriter.TranscodeAndWrite(), System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().