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

◆ WriteStringEscapeProperty() [5/8]

void System.Text.Json.Utf8JsonWriter.WriteStringEscapeProperty ( ReadOnlySpan< char > propertyName,
DateTime value,
int firstEscapeIndexProp )
inlineprivate

Definition at line 896 of file Utf8JsonWriter.cs.

897 {
898 char[] array = null;
899 int maxEscapedLength = JsonWriterHelper.GetMaxEscapedLength(propertyName.Length, firstEscapeIndexProp);
900 Span<char> span = ((maxEscapedLength > 128) ? ((Span<char>)(array = ArrayPool<char>.Shared.Rent(maxEscapedLength))) : stackalloc char[128]);
901 Span<char> destination = span;
902 JsonWriterHelper.EscapeString(propertyName, destination, firstEscapeIndexProp, _options.Encoder, out var written);
904 if (array != null)
905 {
907 }
908 }
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, System.value, and System.Text.Json.Utf8JsonWriter.WriteStringByOptions().

Referenced by System.Text.Json.Utf8JsonWriter.WritePropertyName(), System.Text.Json.Utf8JsonWriter.WritePropertyName(), System.Text.Json.Utf8JsonWriter.WriteStringEscape(), System.Text.Json.Utf8JsonWriter.WriteStringEscape(), System.Text.Json.Utf8JsonWriter.WriteStringEscape(), System.Text.Json.Utf8JsonWriter.WriteStringEscape(), System.Text.Json.Utf8JsonWriter.WriteStringEscape(), and System.Text.Json.Utf8JsonWriter.WriteStringEscape().