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

◆ WriteStringEscapeValueOnly() [2/2]

void System.Text.Json.Utf8JsonWriter.WriteStringEscapeValueOnly ( ReadOnlySpan< byte > escapedPropertyName,
ReadOnlySpan< char > value,
int firstEscapeIndex )
inlineprivate

Definition at line 3358 of file Utf8JsonWriter.cs.

3359 {
3360 char[] array = null;
3361 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(value.Length, firstEscapeIndex);
3362 Span<char> span = ((maxEscapedLength > 128) ? ((Span<char>)(array = ArrayPool<char>.Shared.Rent(maxEscapedLength))) : stackalloc char[128]);
3363 Span<char> destination = span;
3364 JsonWriterHelper.EscapeString(value, destination, firstEscapeIndex, _options.Encoder, out var written);
3366 if (array != null)
3367 {
3369 }
3370 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
void WriteStringByOptions(ReadOnlySpan< char > propertyName, DateTime value)

References System.Text.Json.Utf8JsonWriter._options, System.array, System.destination, System.Text.Json.Dictionary, System.Text.Json.JsonWriterOptions.Encoder, System.Text.Json.JsonWriterHelper.EscapeString(), System.Text.Json.JsonWriterHelper.GetMaxEscapedLength(), System.Buffers.ArrayPool< T >.Shared, System.value, and System.Text.Json.Utf8JsonWriter.WriteStringByOptions().