Esempio n. 1
0
        public void TestGetRuntimeMethodForVirtual()
        {
            Type       type       = typeof(StubHelperTests);
            MethodInfo methodInfo = type.GetMethod("TestGetRuntimeMethodForVirtual");

            Assert.AreEqual(methodInfo, StubHelper.GetRuntimeMethodForVirtual(type, methodInfo));
        }
Esempio n. 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);
        }