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

◆ WriteNumberIndented() [5/10]

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

Definition at line 4124 of file Utf8JsonWriter.cs.

4125 {
4127 int num = indentation + escapedPropertyName.Length + 20 + 4;
4128 int num2 = num + 1 + s_newLineLength;
4130 {
4131 Grow(num2);
4132 }
4133 Span<byte> span = _memory.Span;
4134 if (_currentDepth < 0)
4135 {
4136 span[BytesPending++] = 44;
4137 }
4138 if (_tokenType != 0)
4139 {
4141 }
4142 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
4144 span[BytesPending++] = 34;
4145 escapedPropertyName.CopyTo(span.Slice(BytesPending));
4147 span[BytesPending++] = 34;
4148 span[BytesPending++] = 58;
4149 span[BytesPending++] = 32;
4150 int bytesWritten;
4153 }
static bool TryFormat(bool value, Span< byte > destination, out int bytesWritten, StandardFormat format=default(StandardFormat))
static readonly int s_newLineLength
void Grow(int requiredSize)
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.Buffers.Text.Utf8Formatter.TryFormat(), System.value, System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().