(value)
| 199 | exports.toFridaValue = toFridaValue; |
| 200 | |
| 201 | function valueTypeToArray(value) { |
| 202 | const instanceFields = value.type.class.fields.filter(f => !f.isStatic); |
| 203 | return instanceFields.length == 0 |
| 204 | ? [value.handle.readU8()] |
| 205 | : instanceFields |
| 206 | .map(field => field.withHolder(value).value) |
| 207 | .map(value => value instanceof Il2Cpp.ValueType |
| 208 | ? valueTypeToArray(value) |
| 209 | : value instanceof native_struct.NativeStruct |
| 210 | ? value.handle |
| 211 | : typeof value == "boolean" |
| 212 | ? +value |
| 213 | : value); |
| 214 | } |
| 215 | |
| 216 | function arrayToValueType(type, nativeValues) { |
| 217 | function iter(type, startOffset = 0) { |
no test coverage detected