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

◆ WriteStringEscapeValueOnly() [1/2]

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

Definition at line 3344 of file Utf8JsonWriter.cs.

3345 {
3346 byte[] array = null;
3347 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(utf8Value.Length, firstEscapeIndex);
3348 Span<byte> span = ((maxEscapedLength > 256) ? ((Span<byte>)(array = ArrayPool<byte>.Shared.Rent(maxEscapedLength))) : stackalloc byte[256]);
3349 Span<byte> destination = span;
3350 JsonWriterHelper.EscapeString(utf8Value, destination, firstEscapeIndex, _options.Encoder, out var written);
3352 if (array != null)
3353 {
3355 }
3356 }
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, and System.Text.Json.Utf8JsonWriter.WriteStringByOptions().

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