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

◆ WriteStringIndented() [1/12]

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

Definition at line 1026 of file Utf8JsonWriter.cs.

1027 {
1029 int num = indentation + escapedPropertyName.Length + 33 + 6;
1030 int num2 = num + 1 + s_newLineLength;
1032 {
1033 Grow(num2);
1034 }
1035 Span<byte> span = _memory.Span;
1036 if (_currentDepth < 0)
1037 {
1038 span[BytesPending++] = 44;
1039 }
1040 if (_tokenType != 0)
1041 {
1043 }
1044 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
1046 span[BytesPending++] = 34;
1047 escapedPropertyName.CopyTo(span.Slice(BytesPending));
1049 span[BytesPending++] = 34;
1050 span[BytesPending++] = 58;
1051 span[BytesPending++] = 32;
1052 span[BytesPending++] = 34;
1053 JsonWriterHelper.WriteDateTimeTrimmed(span.Slice(BytesPending), value, out var bytesWritten);
1055 span[BytesPending++] = 34;
1056 }
static readonly int s_newLineLength
void Grow(int requiredSize)
void WriteNewLine(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.value, System.Text.Json.JsonWriterHelper.WriteDateTimeTrimmed(), System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().