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

◆ WriteNumberIndented() [3/10]

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

Definition at line 1920 of file Utf8JsonWriter.cs.

1921 {
1923 int num = indentation + escapedPropertyName.Length + 128 + 4;
1924 int num2 = num + 1 + s_newLineLength;
1926 {
1927 Grow(num2);
1928 }
1929 Span<byte> span = _memory.Span;
1930 if (_currentDepth < 0)
1931 {
1932 span[BytesPending++] = 44;
1933 }
1934 if (_tokenType != 0)
1935 {
1937 }
1938 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
1940 span[BytesPending++] = 34;
1941 escapedPropertyName.CopyTo(span.Slice(BytesPending));
1943 span[BytesPending++] = 34;
1944 span[BytesPending++] = 58;
1945 span[BytesPending++] = 32;
1946 int bytesWritten;
1947 bool flag = TryFormatSingle(value, span.Slice(BytesPending), out bytesWritten);
1949 }
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)
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.TryFormatSingle(), System.value, System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().