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

Method ReadUInt32Array

csharp/src/Fory/TypeResolver.cs:1395–1411  ·  view source on GitHub ↗
(ReadContext context)

Source from the content-addressed store, hash-verified

1393 }
1394
1395 private static uint[] ReadUInt32Array(ReadContext context)
1396 {
1397 int byteSize = checked((int)context.Reader.ReadVarUInt32());
1398 if ((byteSize & 3) != 0)
1399 {
1400 throw new InvalidDataException("uint32 array byte size mismatch");
1401 }
1402
1403 context.Reader.CheckBound(byteSize);
1404 uint[] values = new uint[byteSize / 4];
1405 for (int i = 0; i < values.Length; i++)
1406 {
1407 values[i] = context.Reader.ReadUInt32();
1408 }
1409
1410 return values;
1411 }
1412
1413 private static ulong[] ReadUInt64Array(ReadContext context)
1414 {

Callers

nothing calls this directly

Calls 3

ReadVarUInt32Method · 0.80
CheckBoundMethod · 0.80
ReadUInt32Method · 0.80

Tested by

no test coverage detected