コード例 #1
0
ファイル: stacktrace.cs プロジェクト: wwkkww1983/ZJCredit
        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))));
        }
コード例 #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()));
        }
コード例 #3
0
        public virtual MethodBase GetMethodBase(int i)
        {
            RuntimeMethodHandle handle = this.rgMethodHandle[i];

            if (handle.IsNullHandle())
            {
                return(null);
            }
            return(RuntimeType.GetMethodBase(handle.GetTypicalMethodDefinition()));
        }
コード例 #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));
        }
コード例 #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));
        }