Exemplo n.º 1
0
 public static void Main(string[] args)
 {
     Assembly mscorlib = Assembly.LoadFrom("/usr/lib/mono/4.5/System.dll");
     foreach (Type type in mscorlib.GetTypes())
     {
         foreach (MethodInfo method in type.GetMethods())
         {
             method_list12 a = new method_list12();
             a.method_name = method.Name;
             a.return_type = method.ReturnType.ToString();
             a.class_name = type.FullName;
             var json = JsonConvert.SerializeObject (a);
             Console.WriteLine (json);
             System.IO.File.AppendAllText ("test.txt" ,json);
         }
     }
 }
Exemplo n.º 2
0
        public static void Main(string[] args)
        {
            Assembly mscorlib = Assembly.LoadFrom("/usr/lib/mono/4.5/System.dll");

            foreach (Type type in mscorlib.GetTypes())
            {
                foreach (MethodInfo method in type.GetMethods())
                {
                    method_list12 a = new method_list12();
                    a.method_name = method.Name;
                    a.return_type = method.ReturnType.ToString();
                    a.class_name  = type.FullName;
                    var json = JsonConvert.SerializeObject(a);
                    Console.WriteLine(json);
                    System.IO.File.AppendAllText("test.txt", json);
                }
            }
        }