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

◆ WriteNumberIndented() [1/10]

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

Definition at line 1471 of file Utf8JsonWriter.cs.

1472 {
1474 int num = indentation + escapedPropertyName.Length + 31 + 4;
1475 int num2 = num + 1 + s_newLineLength;
1477 {
1478 Grow(num2);
1479 }
1480 Span<byte> span = _memory.Span;
1481 if (_currentDepth < 0)
1482 {
1483 span[BytesPending++] = 44;
1484 }
1485 if (_tokenType != 0)
1486 {
1488 }
1489 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
1491 span[BytesPending++] = 34;
1492 escapedPropertyName.CopyTo(span.Slice(BytesPending));
1494 span[BytesPending++] = 34;
1495 span[BytesPending++] = 58;
1496 span[BytesPending++] = 32;
1497 int bytesWritten;
1500 }
static bool TryFormat(bool value, Span< byte > destination, out int bytesWritten, StandardFormat format=default(StandardFormat))
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.Buffers.Text.Utf8Formatter.TryFormat(), System.value, System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().