| 1343 | } |
| 1344 | |
| 1345 | MMethod* MClass::GetMethod(const char* name, int32 numParams) const |
| 1346 | { |
| 1347 | // Lookup for cached method |
| 1348 | for (int32 i = 0; i < _methods.Count(); i++) |
| 1349 | { |
| 1350 | if (_methods[i]->GetName() == name && _methods[i]->GetParametersCount() == numParams) |
| 1351 | return _methods[i]; |
| 1352 | } |
| 1353 | |
| 1354 | // Find Mono method |
| 1355 | MonoMethod* monoMethod = mono_class_get_method_from_name(_monoClass, name, numParams); |
| 1356 | if (monoMethod == nullptr) |
| 1357 | return nullptr; |
| 1358 | |
| 1359 | // Create method |
| 1360 | auto method = New<MMethod>(monoMethod, name, (MClass*)this); |
| 1361 | _methods.Add(method); |
| 1362 | return method; |
| 1363 | } |
| 1364 | |
| 1365 | MMethod* MClass::GetMethod(const ScriptingTypeMethodSignature& signature) const |
| 1366 | { |
no test coverage detected