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

◆ WriteStartEscapeProperty() [1/2]

void System.Text.Json.Utf8JsonWriter.WriteStartEscapeProperty ( ReadOnlySpan< byte > utf8PropertyName,
byte token,
int firstEscapeIndexProp )
inlineprivate

Definition at line 374 of file Utf8JsonWriter.cs.

375 {
376 byte[] array = null;
377 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp);
378 Span<byte> span = ((maxEscapedLength > 256) ? ((Span<byte>)(array = ArrayPool<byte>.Shared.Rent(maxEscapedLength))) : stackalloc byte[256]);
379 Span<byte> destination = span;
381 WriteStartByOptions(destination.Slice(0, written), token);
382 if (array != null)
383 {
385 }
386 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
void WriteStartByOptions(ReadOnlySpan< byte > utf8PropertyName, byte token)

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.WriteStartByOptions().

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