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

◆ WriteStringIndented() [12/12]

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

Definition at line 5248 of file Utf8JsonWriter.cs.

5249 {
5251 int num = indentation + escapedValue.Length * 3 + 3 + s_newLineLength;
5252 if (_memory.Length - BytesPending < num)
5253 {
5254 Grow(num);
5255 }
5256 Span<byte> span = _memory.Span;
5257 if (_currentDepth < 0)
5258 {
5259 span[BytesPending++] = 44;
5260 }
5261 if (_tokenType != JsonTokenType.PropertyName)
5262 {
5263 if (_tokenType != 0)
5264 {
5266 }
5267 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
5269 }
5270 span[BytesPending++] = 34;
5272 span[BytesPending++] = 34;
5273 }
static readonly int s_newLineLength
void Grow(int requiredSize)
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.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().