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

◆ WriteCommentIndented() [2/2]

void System.Text.Json.Utf8JsonWriter.WriteCommentIndented ( ReadOnlySpan< char > value)
inlineprivate

Definition at line 4284 of file Utf8JsonWriter.cs.

4285 {
4287 int num = indentation + value.Length * 3 + 4 + s_newLineLength;
4288 if (_memory.Length - BytesPending < num)
4289 {
4290 Grow(num);
4291 }
4292 Span<byte> span = _memory.Span;
4293 if (_tokenType != 0)
4294 {
4296 }
4297 JsonWriterHelper.WriteIndentation(span.Slice(BytesPending), indentation);
4299 span[BytesPending++] = 47;
4301 span[bytesConsumed] = 42;
4302 ReadOnlySpan<byte> utf16Source = MemoryMarshal.AsBytes(value);
4303 int bytesWritten;
4306 span[BytesPending++] = 42;
4307 span[BytesPending++] = 47;
4308 }
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.ToUtf8(), System.value, System.Text.Json.JsonWriterHelper.WriteIndentation(), and System.Text.Json.Utf8JsonWriter.WriteNewLine().

Referenced by System.Text.Json.Utf8JsonWriter.WriteCommentByOptions(), and System.Text.Json.Utf8JsonWriter.WriteCommentByOptions().