You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.1 KiB

  1. using Apewer;
  2. using System;
  3. using System.Reflection;
  4. namespace Apewer.Run
  5. {
  6. class Program
  7. {
  8. public static string[] Arguments = null;
  9. static void Main(string[] args)
  10. {
  11. Arguments = args;
  12. foreach (var type in ClassUtility.GetTypes(Assembly.GetExecutingAssembly()))
  13. {
  14. if (type.Equals(typeof(Program))) continue;
  15. if (!type.IsClass) continue;
  16. if (!type.IsPublic) continue;
  17. Console.Title = type.FullName;
  18. Console.WriteLine("New " + type.FullName);
  19. #if DEBUG
  20. Activator.CreateInstance(type);
  21. #else
  22. try
  23. {
  24. Activator.CreateInstance(type);
  25. }
  26. catch (Exception ex)
  27. {
  28. Console.WriteLine(ex.GetType().FullName);
  29. Console.WriteLine(ex.ToString());
  30. }
  31. #endif
  32. Console.WriteLine();
  33. }
  34. Console.WriteLine("end");
  35. Console.ReadKey();
  36. }
  37. }
  38. }