(ReadContext context)
| 211 | } |
| 212 | |
| 213 | public override ushort[] ReadData(ReadContext context) |
| 214 | { |
| 215 | int byteSize = checked((int)context.Reader.ReadVarUInt32()); |
| 216 | if ((byteSize & 1) != 0) |
| 217 | { |
| 218 | throw new InvalidDataException("uint16 array byte size mismatch"); |
| 219 | } |
| 220 | |
| 221 | context.Reader.CheckBound(byteSize); |
| 222 | ushort[] values = new ushort[byteSize / 2]; |
| 223 | for (int i = 0; i < values.Length; i++) |
| 224 | { |
| 225 | values[i] = context.Reader.ReadUInt16(); |
| 226 | } |
| 227 | |
| 228 | return values; |
| 229 | } |
| 230 | } |
| 231 | |
| 232 | internal sealed class UInt32ArraySerializer : Serializer<uint[]> |
nothing calls this directly
no test coverage detected