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

◆ WriteNumberValueIndented() [2/6]

void System.Text.Json.Utf8JsonWriter.WriteNumberValueIndented ( double value)
inlineprivate

Definition at line 4609 of file Utf8JsonWriter.cs.

4610 {
4612 int num = indentation + 128 + 1 + s_newLineLength;
4613 if (_memory.Length - BytesPending < num)
4614 {
4615 Grow(num);
4616 }
4617 Span<byte> span = _memory.Span;
4618 if (_currentDepth < 0)
4619 {
4620 span[BytesPending++] = 44;
4621 }
4622 if (_tokenType != JsonTokenType.PropertyName)
4623 {
4624 if (_tokenType != 0)
4625 {
4627 }
4628 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
4630 }
4631 int bytesWritten;
4632 bool flag = TryFormatDouble(value, span.Slice(BytesPending), out bytesWritten);
4634 }
static readonly int s_newLineLength
void Grow(int requiredSize)
void WriteNewLine(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._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.TryFormatDouble(), System.value, System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().