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

◆ WriteStringIndented() [8/12]

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

Definition at line 1220 of file Utf8JsonWriter.cs.

1221 {
1223 int num = indentation + escapedPropertyName.Length * 3 + 33 + 7 + s_newLineLength;
1224 if (_memory.Length - BytesPending < num)
1225 {
1226 Grow(num);
1227 }
1228 Span<byte> span = _memory.Span;
1229 if (_currentDepth < 0)
1230 {
1231 span[BytesPending++] = 44;
1232 }
1233 if (_tokenType != 0)
1234 {
1236 }
1237 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
1239 span[BytesPending++] = 34;
1241 span[BytesPending++] = 34;
1242 span[BytesPending++] = 58;
1243 span[BytesPending++] = 32;
1244 span[BytesPending++] = 34;
1245 JsonWriterHelper.WriteDateTimeOffsetTrimmed(span.Slice(BytesPending), value, out var bytesWritten);
1247 span[BytesPending++] = 34;
1248 }
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.WriteDateTimeOffsetTrimmed(), System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().