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

◆ WriteStringIndented() [6/12]

void System.Text.Json.Utf8JsonWriter.WriteStringIndented ( ReadOnlySpan< byte > escapedValue)
inlineprivate

Definition at line 5345 of file Utf8JsonWriter.cs.

5346 {
5348 int num = indentation + escapedValue.Length + 2;
5349 int num2 = num + 1 + s_newLineLength;
5351 {
5352 Grow(num2);
5353 }
5354 Span<byte> span = _memory.Span;
5355 if (_currentDepth < 0)
5356 {
5357 span[BytesPending++] = 44;
5358 }
5359 if (_tokenType != JsonTokenType.PropertyName)
5360 {
5361 if (_tokenType != 0)
5362 {
5364 }
5365 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
5367 }
5368 span[BytesPending++] = 34;
5369 escapedValue.CopyTo(span.Slice(BytesPending));
5370 BytesPending += escapedValue.Length;
5371 span[BytesPending++] = 34;
5372 }
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.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().