示例#1
0
        public void TestGetRuntimeMethodForVirtual()
        {
            Type       type       = typeof(StubHelperTests);
            MethodInfo methodInfo = type.GetMethod("TestGetRuntimeMethodForVirtual");

            Assert.AreEqual(methodInfo, StubHelper.GetRuntimeMethodForVirtual(type, methodInfo));
        }
示例#2
0
        public void Rewrite(RuntimeMethodHandle handle, RuntimeTypeHandle declaringType)
        {
            MethodInfo mi;
            int        i;
            IntPtr     ip;
            Type       type;

            mi = MethodBase.GetMethodFromHandle(handle, declaringType) as MethodInfo;

            type = mi.GetType();

            mi = StubHelper.GetRuntimeMethodForVirtual(type, mi);
        }