MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / GetMethod

Method GetMethod

Source/Engine/Scripting/Runtime/Mono.cpp:1345–1363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1343}
1344
1345MMethod* 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
1365MMethod* MClass::GetMethod(const ScriptingTypeMethodSignature& signature) const
1366{

Callers 15

TestScripting.cppFile · 0.45
InitMainWindowMethod · 0.45
GetThunkMethod · 0.45
FactoryMethod · 0.45
MarshalHelperMethod · 0.45
TryCreateDelegateMethod · 0.45
FactoryMethod · 0.45
ValueTypeUnboxerClass · 0.45
GetPointerMethod · 0.45
InitMethodsMethod · 0.45
ThunkContextMethod · 0.45
InvokerMarshallersMethod · 0.45

Calls 5

CountMethod · 0.45
GetNameMethod · 0.45
GetParametersCountMethod · 0.45
AddMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected