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

◆ WriteNumberIndented() [8/10]

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

Definition at line 1891 of file Utf8JsonWriter.cs.

1892 {
1894 int num = indentation + escapedPropertyName.Length * 3 + 128 + 5 + s_newLineLength;
1895 if (_memory.Length - BytesPending < num)
1896 {
1897 Grow(num);
1898 }
1899 Span<byte> span = _memory.Span;
1900 if (_currentDepth < 0)
1901 {
1902 span[BytesPending++] = 44;
1903 }
1904 if (_tokenType != 0)
1905 {
1907 }
1908 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
1910 span[BytesPending++] = 34;
1912 span[BytesPending++] = 34;
1913 span[BytesPending++] = 58;
1914 span[BytesPending++] = 32;
1915 int bytesWritten;
1916 bool flag = TryFormatSingle(value, span.Slice(BytesPending), out bytesWritten);
1918 }
static readonly int s_newLineLength
void Grow(int requiredSize)
static bool TryFormatSingle(float value, Span< byte > destination, out int bytesWritten)
void WriteNewLine(Span< byte > output)
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._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.TryFormatSingle(), System.value, System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().