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

Method WriteData

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

Source from the content-addressed store, hash-verified

59 public override List<bool> DefaultValue => null!;
60
61 public override void WriteData(WriteContext context, in List<bool> value, bool hasGenerics)
62 {
63 List<bool> list = value ?? [];
64 PrimitiveCollectionHeader.WriteListHeader(context, list.Count, hasGenerics, TypeId.Bool, false);
65 for (int i = 0; i < list.Count; i++)
66 {
67 context.Writer.WriteUInt8(list[i] ? (byte)1 : (byte)0);
68 }
69 }
70
71 public override List<bool> ReadData(ReadContext context)
72 {

Callers

nothing calls this directly

Calls 2

WriteListHeaderMethod · 0.80
WriteUInt8Method · 0.80

Tested by

no test coverage detected