(ReadContext context)
| 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 | |
| 269 | internal sealed class UInt64ArraySerializer : Serializer<ulong[]> |
nothing calls this directly
no test coverage detected