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

◆ WriteNumberMinimized() [3/10]

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

Definition at line 1868 of file Utf8JsonWriter.cs.

1869 {
1870 int num = escapedPropertyName.Length + 128 + 3;
1871 int num2 = num + 1;
1873 {
1874 Grow(num2);
1875 }
1876 Span<byte> span = _memory.Span;
1877 if (_currentDepth < 0)
1878 {
1879 span[BytesPending++] = 44;
1880 }
1881 span[BytesPending++] = 34;
1882 escapedPropertyName.CopyTo(span.Slice(BytesPending));
1884 span[BytesPending++] = 34;
1885 span[BytesPending++] = 58;
1886 int bytesWritten;
1887 bool flag = TryFormatSingle(value, span.Slice(BytesPending), out bytesWritten);
1889 }
void Grow(int requiredSize)
static bool TryFormatSingle(float 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.TryFormatSingle(), and System.value.