(ReadContext context)
| 100 | } |
| 101 | |
| 102 | public override short[] ReadData(ReadContext context) |
| 103 | { |
| 104 | int byteSize = checked((int)context.Reader.ReadVarUInt32()); |
| 105 | if ((byteSize & 1) != 0) |
| 106 | { |
| 107 | throw new InvalidDataException("int16 array byte size mismatch"); |
| 108 | } |
| 109 | |
| 110 | context.Reader.CheckBound(byteSize); |
| 111 | short[] values = new short[byteSize / 2]; |
| 112 | for (int i = 0; i < values.Length; i++) |
| 113 | { |
| 114 | values[i] = context.Reader.ReadInt16(); |
| 115 | } |
| 116 | |
| 117 | return values; |
| 118 | } |
| 119 | } |
| 120 | |
| 121 | internal sealed class Int32ArraySerializer : Serializer<int[]> |
nothing calls this directly
no test coverage detected