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

◆ WriteBase64EscapeProperty() [1/2]

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

Definition at line 695 of file Utf8JsonWriter.cs.

696 {
697 byte[] array = null;
698 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp);
699 Span<byte> span = ((maxEscapedLength > 256) ? ((Span<byte>)(array = ArrayPool<byte>.Shared.Rent(maxEscapedLength))) : stackalloc byte[256]);
700 Span<byte> destination = span;
703 if (array != null)
704 {
706 }
707 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
void WriteBase64ByOptions(ReadOnlySpan< char > propertyName, ReadOnlySpan< byte > bytes)

References System.Text.Json.Utf8JsonWriter._options, System.array, System.bytes, 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.WriteBase64ByOptions().