Ejemplo n.º 1
0
        public static void Main(String[] args)
        {
            Type type = (args.Length > 0) ? Type.GetType(args[0]) : typeof(Object);

            Console.WriteLine(type.ToString());

            ILReader reader = new ILReader(type.Module, new AssemblyLoader());

            foreach (MethodBase methodBase in type.GetMethods(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.Static | BindingFlags.Instance | BindingFlags.DeclaredOnly))
            {
                Console.WriteLine("------------------------------------------------------------------------");
                Console.WriteLine(methodBase.ToString());
                MethodBody methodBody = reader.GetMethodBody(methodBase);
                if (methodBody == null)
                {
                    Console.WriteLine("EMPTY");
                }
                else
                {
                    Dump(methodBody);
                }
            }

            reader.Dispose();
        }