Ejemplo n.º 1
0
        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))));
        }
Ejemplo n.º 2
0
        internal static MethodBase InternalGetCurrentMethod(ref StackCrawlMark stackMark)
        {
            RuntimeMethodHandle currentMethod = RuntimeMethodHandle.GetCurrentMethod(ref stackMark);

            if (currentMethod.IsNullHandle())
            {
                return(null);
            }
            return(RuntimeType.GetMethodBase(currentMethod.GetTypicalMethodDefinition()));
        }
Ejemplo n.º 3
0
        public virtual MethodBase GetMethodBase(int i)
        {
            RuntimeMethodHandle handle = this.rgMethodHandle[i];

            if (handle.IsNullHandle())
            {
                return(null);
            }
            return(RuntimeType.GetMethodBase(handle.GetTypicalMethodDefinition()));
        }
Ejemplo n.º 4
0
        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));
        }
Ejemplo n.º 5
0
        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));
        }