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

◆ WriteStringEscapePropertyOnly() [2/2]

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

Definition at line 3372 of file Utf8JsonWriter.cs.

3373 {
3374 char[] array = null;
3375 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndex);
3376 Span<char> span = ((maxEscapedLength > 128) ? ((Span<char>)(array = ArrayPool<char>.Shared.Rent(maxEscapedLength))) : stackalloc char[128]);
3377 Span<char> destination = span;
3378 JsonWriterHelper.EscapeString(propertyName, destination, firstEscapeIndex, _options.Encoder, out var written);
3380 if (array != null)
3381 {
3383 }
3384 }
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().

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