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

Method ReadData

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

Source from the content-addressed store, hash-verified

248 }
249
250 public override uint[] ReadData(ReadContext context)
251 {
252 int byteSize = checked((int)context.Reader.ReadVarUInt32());
253 if ((byteSize & 3) != 0)
254 {
255 throw new InvalidDataException("uint32 array byte size mismatch");
256 }
257
258 context.Reader.CheckBound(byteSize);
259 uint[] values = new uint[byteSize / 4];
260 for (int i = 0; i < values.Length; i++)
261 {
262 values[i] = context.Reader.ReadUInt32();
263 }
264
265 return values;
266 }
267}
268
269internal sealed class UInt64ArraySerializer : Serializer<ulong[]>

Callers

nothing calls this directly

Calls 3

ReadVarUInt32Method · 0.80
CheckBoundMethod · 0.80
ReadUInt32Method · 0.80

Tested by

no test coverage detected