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

◆ WriteStringEscapeProperty() [4/8]

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

Definition at line 3042 of file Utf8JsonWriter.cs.

3043 {
3044 byte[] array = null;
3045 if (firstEscapeIndexProp != -1)
3046 {
3047 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(utf8PropertyName.Length, firstEscapeIndexProp);
3048 Span<byte> destination;
3049 if (maxEscapedLength > 256)
3050 {
3053 }
3054 else
3055 {
3056 byte* pointer = stackalloc byte[256];
3057 destination = new Span<byte>(pointer, 256);
3058 }
3061 }
3063 if (array != null)
3064 {
3066 }
3067 }
static ArrayPool< T > Shared
Definition ArrayPool.cs:7
void WriteStringByOptionsPropertyName(ReadOnlySpan< char > propertyName)

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.pointer, System.Buffers.ArrayPool< T >.Shared, and System.Text.Json.Utf8JsonWriter.WriteStringByOptionsPropertyName().