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

◆ WriteStringEscapePropertyOnly() [1/2]

void System.Text.Json.Utf8JsonWriter.WriteStringEscapePropertyOnly ( ReadOnlySpan< byte > utf8PropertyName,
ReadOnlySpan< byte > escapedValue,
int firstEscapeIndex )
inlineprivate

Definition at line 3386 of file Utf8JsonWriter.cs.

3387 {
3388 byte[] array = null;
3389 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndex);
3390 Span<byte> span = ((maxEscapedLength > 256) ? ((Span<byte>)(array = ArrayPool<byte>.Shared.Rent(maxEscapedLength))) : stackalloc byte[256]);
3391 Span<byte> destination = span;
3392 JsonWriterHelper.EscapeString(utf8PropertyName, destination, firstEscapeIndex, _options.Encoder, out var written);
3394 if (array != null)
3395 {
3397 }
3398 }
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().