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

◆ WriteNumberIndented() [2/10]

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

Definition at line 1695 of file Utf8JsonWriter.cs.

1696 {
1698 int num = indentation + escapedPropertyName.Length + 128 + 4;
1699 int num2 = num + 1 + s_newLineLength;
1701 {
1702 Grow(num2);
1703 }
1704 Span<byte> span = _memory.Span;
1705 if (_currentDepth < 0)
1706 {
1707 span[BytesPending++] = 44;
1708 }
1709 if (_tokenType != 0)
1710 {
1712 }
1713 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
1715 span[BytesPending++] = 34;
1716 escapedPropertyName.CopyTo(span.Slice(BytesPending));
1718 span[BytesPending++] = 34;
1719 span[BytesPending++] = 58;
1720 span[BytesPending++] = 32;
1721 int bytesWritten;
1722 bool flag = TryFormatDouble(value, span.Slice(BytesPending), out bytesWritten);
1724 }
static readonly int s_newLineLength
void Grow(int requiredSize)
void WriteNewLine(Span< byte > output)
static bool TryFormatDouble(double value, Span< byte > destination, out int bytesWritten)
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.TryFormatDouble(), System.value, System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().