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

◆ WriteNumberMinimized() [7/10]

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

Definition at line 1622 of file Utf8JsonWriter.cs.

1623 {
1624 int num = escapedPropertyName.Length * 3 + 128 + 4;
1625 if (_memory.Length - BytesPending < num)
1626 {
1627 Grow(num);
1628 }
1629 Span<byte> span = _memory.Span;
1630 if (_currentDepth < 0)
1631 {
1632 span[BytesPending++] = 44;
1633 }
1634 span[BytesPending++] = 34;
1636 span[BytesPending++] = 34;
1637 span[BytesPending++] = 58;
1638 int bytesWritten;
1639 bool flag = TryFormatDouble(value, span.Slice(BytesPending), out bytesWritten);
1641 }
void Grow(int requiredSize)
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.BytesPending, System.Text.Json.Dictionary, System.Text.Json.Utf8JsonWriter.Grow(), System.Memory< T >.Length, System.Memory< T >.Span, System.Text.Json.Utf8JsonWriter.TranscodeAndWrite(), System.Text.Json.Utf8JsonWriter.TryFormatDouble(), and System.value.