Ejemplo n.º 1
0
        void CheckMethod(Assembly lib, MethodInfo method)
        {
            MethodBody body = method.GetMethodBody();

            if (body == null)
            {
                return;
            }

            byte[]             data = body.GetILAsByteArray();
            List <Instruction> all  = InstructionProcessor.GetAll(data);

            foreach (Instruction ins in all)
            {
                if (ins.UsesMethod)
                {
                    ResolveMethod(lib, method, ins);
                }
                if (ins.UsesField)
                {
                    ResolveField(lib, method, ins);
                }
                if (ins.UsesType)
                {
                    ResolveType(lib, method, ins);
                }
            }
        }
Ejemplo n.º 2
0
 public void Init(string root)
 {
     this.root = root;
     //AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += ResolveAssembly;
     AppDomain.CurrentDomain.AssemblyResolve += ResolveAssembly;
     InstructionProcessor.InitCache();
 }