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

◆ WriteCommentMinimized() [2/2]

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

Definition at line 4265 of file Utf8JsonWriter.cs.

4266 {
4267 int num = value.Length * 3 + 4;
4268 if (_memory.Length - BytesPending < num)
4269 {
4270 Grow(num);
4271 }
4272 Span<byte> span = _memory.Span;
4273 span[BytesPending++] = 47;
4275 span[bytesConsumed] = 42;
4276 ReadOnlySpan<byte> utf16Source = MemoryMarshal.AsBytes(value);
4277 int bytesWritten;
4280 span[BytesPending++] = 42;
4281 span[BytesPending++] = 47;
4282 }
void Grow(int requiredSize)
unsafe Span< T > Span
Definition Memory.cs:28

References System.Text.Json.Utf8JsonWriter._memory, System.Text.Json.Utf8JsonWriter.BytesPending, System.Text.Json.Dictionary, System.Text.Json.Utf8JsonWriter.Grow(), System.Memory< T >.Length, System.Memory< T >.Span, System.Text.Json.JsonWriterHelper.ToUtf8(), and System.value.

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