Esempio n. 1
0
        public TypeMethodHandle GetMethod(BaseJIT jit)
        {
            foreach (AssemblyLoader loader in this.assemblies.Values.Skip(1))
            {
                return(loader.ReadMethod(jit, loader.EntryMethod));
            }

            throw new EntryPointNotFoundException();
        }
Esempio n. 2
0
        public TypeMethodHandle ReadMethod(BaseJIT jit, MethodDefinitionHandle methodHandle)
        {
            MethodDefinition methodDefinition = this.metadata.GetMethodDefinition(methodHandle);
            TypeDefinition   typeDefinition   = this.metadata.GetTypeDefinition(methodDefinition.GetDeclaringType());

            TypeHandle      typeHandle = this.typeLoader.LoadType(this.metadata, typeDefinition);
            MethodBodyBlock methodBody = this.peReader.GetMethodBody(methodDefinition.RelativeVirtualAddress);

            return(typeHandle.LoadMethod(jit, this, this.metadata, methodHandle, methodBody));
        }