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

Method WriteData

csharp/src/Fory/PrimitiveCollectionSerializers.cs:286–294  ·  view source on GitHub ↗
(WriteContext context, in List<Half> value, bool hasGenerics)

Source from the content-addressed store, hash-verified

284 public override List<Half> DefaultValue => null!;
285
286 public override void WriteData(WriteContext context, in List<Half> value, bool hasGenerics)
287 {
288 List<Half> list = value ?? [];
289 PrimitiveCollectionHeader.WriteListHeader(context, list.Count, hasGenerics, TypeId.Float16, false);
290 for (int i = 0; i < list.Count; i++)
291 {
292 context.Writer.WriteUInt16(BitConverter.HalfToUInt16Bits(list[i]));
293 }
294 }
295
296 public override List<Half> ReadData(ReadContext context)
297 {

Callers

nothing calls this directly

Calls 2

WriteListHeaderMethod · 0.80
WriteUInt16Method · 0.80

Tested by

no test coverage detected