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

◆ WriteStringIndented() [2/12]

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

Definition at line 1250 of file Utf8JsonWriter.cs.

1251 {
1253 int num = indentation + escapedPropertyName.Length + 33 + 6;
1254 int num2 = num + 1 + s_newLineLength;
1256 {
1257 Grow(num2);
1258 }
1259 Span<byte> span = _memory.Span;
1260 if (_currentDepth < 0)
1261 {
1262 span[BytesPending++] = 44;
1263 }
1264 if (_tokenType != 0)
1265 {
1267 }
1268 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
1270 span[BytesPending++] = 34;
1271 escapedPropertyName.CopyTo(span.Slice(BytesPending));
1273 span[BytesPending++] = 34;
1274 span[BytesPending++] = 58;
1275 span[BytesPending++] = 32;
1276 span[BytesPending++] = 34;
1277 JsonWriterHelper.WriteDateTimeOffsetTrimmed(span.Slice(BytesPending), value, out var bytesWritten);
1279 span[BytesPending++] = 34;
1280 }
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.WriteDateTimeOffsetTrimmed(), System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().