AssemblyHelper.cs 567 B

123456789101112131415161718192021222324
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Reflection;
  4. namespace ET
  5. {
  6. public static class AssemblyHelper
  7. {
  8. public static Dictionary<string, Type> GetAssemblyTypes(params Assembly[] args)
  9. {
  10. Dictionary<string, Type> types = new Dictionary<string, Type>();
  11. foreach (Assembly ass in args)
  12. {
  13. foreach (Type type in ass.GetTypes())
  14. {
  15. types[type.FullName] = type;
  16. }
  17. }
  18. return types;
  19. }
  20. }
  21. }