MCPcopy Create free account
hub / github.com/apache/fory / WriteData

Method WriteData

csharp/src/Fory/TimeSerializers.cs:219–228  ·  view source on GitHub ↗
(WriteContext context, in List<DateTime> value, bool hasGenerics)

Source from the content-addressed store, hash-verified

217 public override List<DateTime> DefaultValue => null!;
218
219 public override void WriteData(WriteContext context, in List<DateTime> value, bool hasGenerics)
220 {
221 List<DateTime> list = value ?? [];
222 PrimitiveCollectionHeader.WriteListHeader(context, list.Count, hasGenerics, TypeId.Timestamp, false);
223 for (int i = 0; i < list.Count; i++)
224 {
225 DateTimeOffset dto = TimeCodec.ToDateTimeOffset(list[i]);
226 TimeCodec.WriteTimestamp(context, dto);
227 }
228 }
229
230 public override List<DateTime> ReadData(ReadContext context)
231 {

Callers

nothing calls this directly

Calls 3

WriteListHeaderMethod · 0.80
ToDateTimeOffsetMethod · 0.80
WriteTimestampMethod · 0.80

Tested by

no test coverage detected