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

◆ TranscodeAndWriteRawValue()

void System.Text.Json.Utf8JsonWriter.TranscodeAndWriteRawValue ( ReadOnlySpan< char > json,
bool skipInputValidation )
inlineprivate

Definition at line 5042 of file Utf8JsonWriter.cs.

5043 {
5044 if (json.Length > 715827882)
5045 {
5046 ThrowHelper.ThrowArgumentException_ValueTooLarge(json.Length);
5047 }
5048 byte[] array = null;
5049 Span<byte> span = (((long)json.Length > 349525L) ? new byte[JsonReaderHelper.GetUtf8ByteCount(json)] : (array = ArrayPool<byte>.Shared.Rent(json.Length * 3)));
5050 try
5051 {
5052 span = span[..JsonReaderHelper.GetUtf8FromText(json, span)];
5054 }
5055 finally
5056 {
5057 if (array != null)
5058 {
5059 span.Clear();
5061 }
5062 }
5063 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
void WriteRawValueCore(ReadOnlySpan< byte > utf8Json, bool skipInputValidation)

References System.array, System.Text.Json.Dictionary, System.Text.Json.JsonReaderHelper.GetUtf8ByteCount(), System.Text.Json.JsonReaderHelper.GetUtf8FromText(), System.L, System.Buffers.ArrayPool< T >.Shared, System.Text.Json.ThrowHelper.ThrowArgumentException_ValueTooLarge(), and System.Text.Json.Utf8JsonWriter.WriteRawValueCore().

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