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

◆ GetParentDefinition()

RuntimeMethodInfo System.Reflection.RuntimeMethodInfo.GetParentDefinition ( )
inlinepackage

Definition at line 215 of file RuntimeMethodInfo.cs.

216 {
217 if (!base.IsVirtual || m_declaringType.IsInterface)
218 {
219 return null;
220 }
221 RuntimeType runtimeType = (RuntimeType)m_declaringType.BaseType;
222 if (runtimeType == null)
223 {
224 return null;
225 }
226 int slot = RuntimeMethodHandle.GetSlot(this);
227 if (RuntimeTypeHandle.GetNumVirtuals(runtimeType) <= slot)
228 {
229 return null;
230 }
231 return (RuntimeMethodInfo)RuntimeType.GetMethodBase(runtimeType, RuntimeTypeHandle.GetMethodAt(runtimeType, slot));
232 }
RuntimeMethodInfo(RuntimeMethodHandleInternal handle, RuntimeType declaringType, RuntimeType.RuntimeTypeCache reflectedTypeCache, MethodAttributes methodAttributes, BindingFlags bindingFlags, object keepalive)
override Type BaseType
bool IsInterface
Definition Type.cs:30

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

Referenced by System.Reflection.CustomAttribute.GetCustomAttributes(), and System.Reflection.CustomAttribute.IsDefined().