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

◆ WriteStringMinimized() [7/12]

void System.Text.Json.Utf8JsonWriter.WriteStringMinimized ( ReadOnlySpan< char > escapedPropertyName,
DateTime value )
inlineprivate

Definition at line 950 of file Utf8JsonWriter.cs.

951 {
952 int num = escapedPropertyName.Length * 3 + 33 + 6;
953 if (_memory.Length - BytesPending < num)
954 {
955 Grow(num);
956 }
957 Span<byte> span = _memory.Span;
958 if (_currentDepth < 0)
959 {
960 span[BytesPending++] = 44;
961 }
962 span[BytesPending++] = 34;
964 span[BytesPending++] = 34;
965 span[BytesPending++] = 58;
966 span[BytesPending++] = 34;
967 JsonWriterHelper.WriteDateTimeTrimmed(span.Slice(BytesPending), value, out var bytesWritten);
969 span[BytesPending++] = 34;
970 }
void Grow(int requiredSize)
void TranscodeAndWrite(ReadOnlySpan< char > escapedPropertyName, Span< byte > output)
unsafe Span< T > Span
Definition Memory.cs:28

References System.Text.Json.Utf8JsonWriter._currentDepth, System.Text.Json.Utf8JsonWriter._memory, System.Text.Json.Utf8JsonWriter.BytesPending, System.Text.Json.Dictionary, System.Text.Json.Utf8JsonWriter.Grow(), System.Memory< T >.Length, System.Memory< T >.Span, System.Text.Json.Utf8JsonWriter.TranscodeAndWrite(), System.value, and System.Text.Json.JsonWriterHelper.WriteDateTimeTrimmed().

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