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

◆ WriteRawValueCore()

void System.Text.Json.Utf8JsonWriter.WriteRawValueCore ( ReadOnlySpan< byte > utf8Json,
bool skipInputValidation )
inlineprivate

Definition at line 5065 of file Utf8JsonWriter.cs.

5066 {
5067 int length = utf8Json.Length;
5068 if (length == 0)
5069 {
5070 ThrowHelper.ThrowArgumentException(System.SR.ExpectedJsonTokens);
5071 }
5073 {
5074 _tokenType = JsonTokenType.String;
5075 }
5076 else
5077 {
5078 Utf8JsonReader utf8JsonReader = new Utf8JsonReader(utf8Json);
5079 while (utf8JsonReader.Read())
5080 {
5081 }
5082 _tokenType = utf8JsonReader.TokenType;
5083 }
5084 int num = length + 1;
5085 if (_memory.Length - BytesPending < num)
5086 {
5087 Grow(num);
5088 }
5089 Span<byte> span = _memory.Span;
5090 if (_currentDepth < 0)
5091 {
5092 span[BytesPending++] = 44;
5093 }
5094 utf8Json.CopyTo(span.Slice(BytesPending));
5097 }
static string ExpectedJsonTokens
Definition SR.cs:54
Definition SR.cs:7
void Grow(int requiredSize)
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.SR.ExpectedJsonTokens, System.Text.Json.Utf8JsonWriter.Grow(), System.length, System.Memory< T >.Length, System.Text.Json.Utf8JsonWriter.SetFlagToAddListSeparatorBeforeNextItem(), System.Memory< T >.Span, and System.Text.Json.ThrowHelper.ThrowArgumentException().

Referenced by System.Text.Json.Utf8JsonWriter.TranscodeAndWriteRawValue(), and System.Text.Json.Utf8JsonWriter.WriteRawValue().