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

Method ReadData

csharp/src/Fory/PrimitiveArraySerializers.cs:38–49  ·  view source on GitHub ↗
(ReadContext context)

Source from the content-addressed store, hash-verified

36 }
37
38 public override bool[] ReadData(ReadContext context)
39 {
40 int byteSize = checked((int)context.Reader.ReadVarUInt32());
41 context.Reader.CheckBound(byteSize);
42 bool[] values = new bool[byteSize];
43 for (int i = 0; i < byteSize; i++)
44 {
45 values[i] = context.Reader.ReadUInt8() != 0;
46 }
47
48 return values;
49 }
50}
51
52internal sealed class Int8ArraySerializer : Serializer<sbyte[]>

Callers

nothing calls this directly

Calls 3

ReadVarUInt32Method · 0.80
CheckBoundMethod · 0.80
ReadUInt8Method · 0.80

Tested by

no test coverage detected