Exemple #1
0
        internal static IRuntimeMethodInfo ResolveMethodHandleInternal(RuntimeModule module, int methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
        {
            int num;
            int num2;

            IntPtr[] ptrArray  = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out num);
            IntPtr[] ptrArray2 = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out num2);
            RuntimeMethodHandleInternal methodHandleValue = ResolveMethodHandleInternalCore(module, methodToken, ptrArray, num, ptrArray2, num2);
            IRuntimeMethodInfo          info = new RuntimeMethodInfoStub(methodHandleValue, RuntimeMethodHandle.GetLoaderAllocator(methodHandleValue));

            GC.KeepAlive(typeInstantiationContext);
            GC.KeepAlive(methodInstantiationContext);
            return(info);
        }
Exemple #2
0
        internal static IRuntimeMethodInfo ResolveMethodHandleInternal(RuntimeModule module, int methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
        {
            int length1;

            IntPtr[] typeInstantiationContext1 = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out length1);
            int      length2;

            IntPtr[] methodInstantiationContext1              = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out length2);
            RuntimeMethodHandleInternal methodHandleInternal  = ModuleHandle.ResolveMethodHandleInternalCore(module, methodToken, typeInstantiationContext1, length1, methodInstantiationContext1, length2);
            RuntimeMethodInfoStub       runtimeMethodInfoStub = new RuntimeMethodInfoStub(methodHandleInternal, (object)RuntimeMethodHandle.GetLoaderAllocator(methodHandleInternal));

            GC.KeepAlive((object)typeInstantiationContext);
            GC.KeepAlive((object)methodInstantiationContext);
            return((IRuntimeMethodInfo)runtimeMethodInfoStub);
        }
Exemple #3
0
        internal static IRuntimeMethodInfo ResolveMethodHandleInternal(RuntimeModule module, int methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
        {
            int typeInstCount;

            IntPtr[] typeInstantiationContext2 = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out typeInstCount);
            int      methodInstCount;

            IntPtr[] methodInstantiationContext2 = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out methodInstCount);
            RuntimeMethodHandleInternal runtimeMethodHandleInternal = ModuleHandle.ResolveMethodHandleInternalCore(module, methodToken, typeInstantiationContext2, typeInstCount, methodInstantiationContext2, methodInstCount);
            IRuntimeMethodInfo          result = new RuntimeMethodInfoStub(runtimeMethodHandleInternal, RuntimeMethodHandle.GetLoaderAllocator(runtimeMethodHandleInternal));

            GC.KeepAlive(typeInstantiationContext);
            GC.KeepAlive(methodInstantiationContext);
            return(result);
        }
Exemple #4
0
        [System.Security.SecuritySafeCritical]  // auto-generated
        internal static IRuntimeMethodInfo ResolveMethodHandleInternal(RuntimeModule module, int methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
        {
            int typeInstCount, methodInstCount;

            IntPtr[] typeInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out typeInstCount);
            IntPtr[] methodInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out methodInstCount);

            RuntimeMethodHandleInternal handle = ResolveMethodHandleInternalCore(module, methodToken, typeInstantiationContextHandles, typeInstCount, methodInstantiationContextHandles, methodInstCount);
            IRuntimeMethodInfo retVal = new RuntimeMethodInfoStub(handle, RuntimeMethodHandle.GetLoaderAllocator(handle));
            GC.KeepAlive(typeInstantiationContext);
            GC.KeepAlive(methodInstantiationContext);
            return retVal;
        }
		internal static IRuntimeMethodInfo ResolveMethodHandleInternal(RuntimeModule module, int methodToken, RuntimeTypeHandle[] typeInstantiationContext, RuntimeTypeHandle[] methodInstantiationContext)
		{
			int typeInstCount;
			IntPtr[] typeInstantiationContext2 = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, out typeInstCount);
			int methodInstCount;
			IntPtr[] methodInstantiationContext2 = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, out methodInstCount);
			RuntimeMethodHandleInternal runtimeMethodHandleInternal = ModuleHandle.ResolveMethodHandleInternalCore(module, methodToken, typeInstantiationContext2, typeInstCount, methodInstantiationContext2, methodInstCount);
			IRuntimeMethodInfo result = new RuntimeMethodInfoStub(runtimeMethodHandleInternal, RuntimeMethodHandle.GetLoaderAllocator(runtimeMethodHandleInternal));
			GC.KeepAlive(typeInstantiationContext);
			GC.KeepAlive(methodInstantiationContext);
			return result;
		}
 [System.Security.SecurityCritical]  // auto-generated
 internal MethodBase GetMethodBase()
 {
     if(null == _MethodBase)
     {
         unsafe 
         {
             IRuntimeMethodInfo mh = new RuntimeMethodInfoStub(_methodDesc, null);
             _MethodBase = RuntimeType.GetMethodBase(Type.GetTypeFromHandleUnsafe(_governingType), mh);
         }
     }           
     return _MethodBase;
 }
 internal System.Reflection.MethodBase GetMethodBase()
 {
     if (null == this._MethodBase)
     {
         IRuntimeMethodInfo methodHandle = new RuntimeMethodInfoStub(this._methodDesc, null);
         this._MethodBase = RuntimeType.GetMethodBase(Type.GetTypeFromHandleUnsafe(this._governingType), methodHandle);
     }
     return this._MethodBase;
 }