(ReadContext context)
| 396 | } |
| 397 | |
| 398 | public override float[] ReadData(ReadContext context) |
| 399 | { |
| 400 | int byteSize = checked((int)context.Reader.ReadVarUInt32()); |
| 401 | if ((byteSize & 3) != 0) |
| 402 | { |
| 403 | throw new InvalidDataException("float32 array byte size mismatch"); |
| 404 | } |
| 405 | |
| 406 | context.Reader.CheckBound(byteSize); |
| 407 | float[] values = new float[byteSize / 4]; |
| 408 | for (int i = 0; i < values.Length; i++) |
| 409 | { |
| 410 | values[i] = context.Reader.ReadFloat32(); |
| 411 | } |
| 412 | |
| 413 | return values; |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | internal sealed class Float64ArraySerializer : Serializer<double[]> |
nothing calls this directly
no test coverage detected