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

◆ WriteBase64EscapeProperty() [2/2]

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

Definition at line 681 of file Utf8JsonWriter.cs.

682 {
683 char[] array = null;
684 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp);
685 Span<char> span = ((maxEscapedLength > 128) ? ((Span<char>)(array = ArrayPool<char>.Shared.Rent(maxEscapedLength))) : stackalloc char[128]);
686 Span<char> destination = span;
687 JsonWriterHelper.EscapeString(propertyName, destination, firstEscapeIndexProp, _options.Encoder, out var written);
689 if (array != null)
690 {
692 }
693 }
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().

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