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

◆ WriteStringMinimized() [2/12]

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

Definition at line 1196 of file Utf8JsonWriter.cs.

1197 {
1198 int num = escapedPropertyName.Length + 33 + 5;
1199 int num2 = num + 1;
1201 {
1202 Grow(num2);
1203 }
1204 Span<byte> span = _memory.Span;
1205 if (_currentDepth < 0)
1206 {
1207 span[BytesPending++] = 44;
1208 }
1209 span[BytesPending++] = 34;
1210 escapedPropertyName.CopyTo(span.Slice(BytesPending));
1212 span[BytesPending++] = 34;
1213 span[BytesPending++] = 58;
1214 span[BytesPending++] = 34;
1215 JsonWriterHelper.WriteDateTimeOffsetTrimmed(span.Slice(BytesPending), value, out var bytesWritten);
1217 span[BytesPending++] = 34;
1218 }
void Grow(int requiredSize)
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.value, and System.Text.Json.JsonWriterHelper.WriteDateTimeOffsetTrimmed().