(ReadContext context)
| 137 | } |
| 138 | |
| 139 | public override int[] ReadData(ReadContext context) |
| 140 | { |
| 141 | int byteSize = checked((int)context.Reader.ReadVarUInt32()); |
| 142 | if ((byteSize & 3) != 0) |
| 143 | { |
| 144 | throw new InvalidDataException("int32 array byte size mismatch"); |
| 145 | } |
| 146 | |
| 147 | context.Reader.CheckBound(byteSize); |
| 148 | int[] values = new int[byteSize / 4]; |
| 149 | for (int i = 0; i < values.Length; i++) |
| 150 | { |
| 151 | values[i] = context.Reader.ReadInt32(); |
| 152 | } |
| 153 | |
| 154 | return values; |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | internal sealed class Int64ArraySerializer : Serializer<long[]> |
nothing calls this directly
no test coverage detected