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

◆ WriteStringIndented() [7/12]

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

Definition at line 996 of file Utf8JsonWriter.cs.

997 {
999 int num = indentation + escapedPropertyName.Length * 3 + 33 + 7 + s_newLineLength;
1000 if (_memory.Length - BytesPending < num)
1001 {
1002 Grow(num);
1003 }
1004 Span<byte> span = _memory.Span;
1005 if (_currentDepth < 0)
1006 {
1007 span[BytesPending++] = 44;
1008 }
1009 if (_tokenType != 0)
1010 {
1012 }
1013 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
1015 span[BytesPending++] = 34;
1017 span[BytesPending++] = 34;
1018 span[BytesPending++] = 58;
1019 span[BytesPending++] = 32;
1020 span[BytesPending++] = 34;
1021 JsonWriterHelper.WriteDateTimeTrimmed(span.Slice(BytesPending), value, out var bytesWritten);
1023 span[BytesPending++] = 34;
1024 }
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.value, System.Text.Json.JsonWriterHelper.WriteDateTimeTrimmed(), System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().

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