public virtual MethodBase GetMethodBase(int i) { IntPtr methodHandleValue = this.rgMethodHandle[i]; if (methodHandleValue.IsNull()) { return((MethodBase)null); } return(RuntimeType.GetMethodBase(RuntimeMethodHandle.GetTypicalMethodDefinition((IRuntimeMethodInfo) new RuntimeMethodInfoStub(methodHandleValue, (object)this)))); }
internal static MethodBase InternalGetCurrentMethod(ref StackCrawlMark stackMark) { RuntimeMethodHandle currentMethod = RuntimeMethodHandle.GetCurrentMethod(ref stackMark); if (currentMethod.IsNullHandle()) { return(null); } return(RuntimeType.GetMethodBase(currentMethod.GetTypicalMethodDefinition())); }
public virtual MethodBase GetMethodBase(int i) { RuntimeMethodHandle handle = this.rgMethodHandle[i]; if (handle.IsNullHandle()) { return(null); } return(RuntimeType.GetMethodBase(handle.GetTypicalMethodDefinition())); }
public virtual MethodBase GetMethodBase(int i) { IntPtr methodHandleValue = this.rgMethodHandle[i]; if (methodHandleValue.IsNull()) { return(null); } IRuntimeMethodInfo typicalMethodDefinition = RuntimeMethodHandle.GetTypicalMethodDefinition(new RuntimeMethodInfoStub(methodHandleValue, this)); return(RuntimeType.GetMethodBase(typicalMethodDefinition)); }
public virtual MethodBase GetMethodBase(int i) { // There may be a better way to do this. // we got RuntimeMethodHandles here and we need to go to MethodBase // but we don't know whether the reflection info has been initialized // or not. So we call GetMethods and GetConstructors on the type // and then we fetch the proper MethodBase!! IntPtr mh = rgMethodHandle[i]; if (mh.IsNull()) { return(null); } IRuntimeMethodInfo mhReal = RuntimeMethodHandle.GetTypicalMethodDefinition(new RuntimeMethodInfoStub(mh, this)); return(RuntimeType.GetMethodBase(mhReal)); }