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

Method WriteData

csharp/src/Fory/PrimitiveArraySerializers.cs:27–36  ·  view source on GitHub ↗
(WriteContext context, in bool[] value, bool hasGenerics)

Source from the content-addressed store, hash-verified

25 public override bool[] DefaultValue => null!;
26
27 public override void WriteData(WriteContext context, in bool[] value, bool hasGenerics)
28 {
29 _ = hasGenerics;
30 bool[] safe = value ?? [];
31 context.Writer.WriteVarUInt32((uint)safe.Length);
32 for (int i = 0; i < safe.Length; i++)
33 {
34 context.Writer.WriteUInt8(safe[i] ? (byte)1 : (byte)0);
35 }
36 }
37
38 public override bool[] ReadData(ReadContext context)
39 {

Callers

nothing calls this directly

Calls 2

WriteVarUInt32Method · 0.80
WriteUInt8Method · 0.80

Tested by

no test coverage detected