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

◆ WriteNumberMinimized() [8/10]

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

Definition at line 1847 of file Utf8JsonWriter.cs.

1848 {
1849 int num = escapedPropertyName.Length * 3 + 128 + 4;
1850 if (_memory.Length - BytesPending < num)
1851 {
1852 Grow(num);
1853 }
1854 Span<byte> span = _memory.Span;
1855 if (_currentDepth < 0)
1856 {
1857 span[BytesPending++] = 44;
1858 }
1859 span[BytesPending++] = 34;
1861 span[BytesPending++] = 34;
1862 span[BytesPending++] = 58;
1863 int bytesWritten;
1864 bool flag = TryFormatSingle(value, span.Slice(BytesPending), out bytesWritten);
1866 }
void Grow(int requiredSize)
static bool TryFormatSingle(float value, Span< byte > destination, out int bytesWritten)
void TranscodeAndWrite(ReadOnlySpan< char > escapedPropertyName, 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.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.TryFormatSingle(), and System.value.