Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ GetBaseDefinition()

override MethodInfo System.Reflection.RuntimeMethodInfo.GetBaseDefinition ( )
inline

Definition at line 492 of file RuntimeMethodInfo.cs.

493 {
494 if (!base.IsVirtual || base.IsStatic || m_declaringType == null || m_declaringType.IsInterface)
495 {
496 return this;
497 }
498 int slot = RuntimeMethodHandle.GetSlot(this);
499 RuntimeType runtimeType = (RuntimeType)DeclaringType;
500 RuntimeType reflectedType = runtimeType;
501 RuntimeMethodHandleInternal methodHandle = default(RuntimeMethodHandleInternal);
502 do
503 {
504 int numVirtuals = RuntimeTypeHandle.GetNumVirtuals(runtimeType);
505 if (numVirtuals <= slot)
506 {
507 break;
508 }
509 methodHandle = RuntimeTypeHandle.GetMethodAt(runtimeType, slot);
511 runtimeType = (RuntimeType)runtimeType.BaseType;
512 }
513 while (runtimeType != null);
514 return (MethodInfo)RuntimeType.GetMethodBase(reflectedType, methodHandle);
515 }
bool IsInterface
Definition Type.cs:30

References System.Reflection.RuntimeMethodInfo.DeclaringType, System.RuntimeTypeHandle.GetMethodAt(), System.RuntimeType.GetMethodBase(), System.RuntimeTypeHandle.GetNumVirtuals(), System.RuntimeMethodHandle.GetSlot(), System.Type.IsInterface, and System.Reflection.RuntimeMethodInfo.m_declaringType.