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

◆ WriteCommentIndented() [1/2]

void System.Text.Json.Utf8JsonWriter.WriteCommentIndented ( ReadOnlySpan< byte > utf8Value)
inlineprivate

Definition at line 4348 of file Utf8JsonWriter.cs.

4349 {
4351 int num = indentation + utf8Value.Length + 4;
4352 int num2 = num + s_newLineLength;
4354 {
4355 Grow(num2);
4356 }
4357 Span<byte> span = _memory.Span;
4358 if (_tokenType != JsonTokenType.PropertyName)
4359 {
4360 if (_tokenType != 0)
4361 {
4363 }
4364 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
4366 }
4367 span[BytesPending++] = 47;
4368 span[BytesPending++] = 42;
4369 utf8Value.CopyTo(span.Slice(BytesPending));
4370 BytesPending += utf8Value.Length;
4371 span[BytesPending++] = 42;
4372 span[BytesPending++] = 47;
4373 }
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._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().