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

◆ WriteStringMinimized() [8/12]

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

Definition at line 1174 of file Utf8JsonWriter.cs.

1175 {
1176 int num = escapedPropertyName.Length * 3 + 33 + 6;
1177 if (_memory.Length - BytesPending < num)
1178 {
1179 Grow(num);
1180 }
1181 Span<byte> span = _memory.Span;
1182 if (_currentDepth < 0)
1183 {
1184 span[BytesPending++] = 44;
1185 }
1186 span[BytesPending++] = 34;
1188 span[BytesPending++] = 34;
1189 span[BytesPending++] = 58;
1190 span[BytesPending++] = 34;
1191 JsonWriterHelper.WriteDateTimeOffsetTrimmed(span.Slice(BytesPending), value, out var bytesWritten);
1193 span[BytesPending++] = 34;
1194 }
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.WriteDateTimeOffsetTrimmed().