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

◆ WriteNumberIndented() [7/10]

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

Definition at line 1666 of file Utf8JsonWriter.cs.

1667 {
1669 int num = indentation + escapedPropertyName.Length * 3 + 128 + 5 + s_newLineLength;
1670 if (_memory.Length - BytesPending < num)
1671 {
1672 Grow(num);
1673 }
1674 Span<byte> span = _memory.Span;
1675 if (_currentDepth < 0)
1676 {
1677 span[BytesPending++] = 44;
1678 }
1679 if (_tokenType != 0)
1680 {
1682 }
1683 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
1685 span[BytesPending++] = 34;
1687 span[BytesPending++] = 34;
1688 span[BytesPending++] = 58;
1689 span[BytesPending++] = 32;
1690 int bytesWritten;
1691 bool flag = TryFormatDouble(value, span.Slice(BytesPending), out bytesWritten);
1693 }
static readonly int s_newLineLength
void Grow(int requiredSize)
void WriteNewLine(Span< byte > output)
void TranscodeAndWrite(ReadOnlySpan< char > escapedPropertyName, 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.TranscodeAndWrite(), System.Text.Json.Utf8JsonWriter.TryFormatDouble(), System.value, System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().