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

◆ WriteNumberMinimized() [2/10]

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

Definition at line 1643 of file Utf8JsonWriter.cs.

1644 {
1645 int num = escapedPropertyName.Length + 128 + 3;
1646 int num2 = num + 1;
1648 {
1649 Grow(num2);
1650 }
1651 Span<byte> span = _memory.Span;
1652 if (_currentDepth < 0)
1653 {
1654 span[BytesPending++] = 44;
1655 }
1656 span[BytesPending++] = 34;
1657 escapedPropertyName.CopyTo(span.Slice(BytesPending));
1659 span[BytesPending++] = 34;
1660 span[BytesPending++] = 58;
1661 int bytesWritten;
1662 bool flag = TryFormatDouble(value, span.Slice(BytesPending), out bytesWritten);
1664 }
void Grow(int requiredSize)
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.BytesPending, System.Text.Json.Dictionary, System.Text.Json.Utf8JsonWriter.Grow(), System.Memory< T >.Length, System.Memory< T >.Span, System.Text.Json.Utf8JsonWriter.TryFormatDouble(), and System.value.