示例#1
0
 public static void LoadPluginsFolder(string pluginsFolder)
 {
     if (!Directory.Exists(pluginsFolder))
     {
         Directory.CreateDirectory(pluginsFolder);
     }
     foreach (var plugin in Directory.GetFiles(pluginsFolder, "*.dll"))
     {
         var assembly = Assembly.LoadFrom(plugin);
         assembly = AppDomain.CurrentDomain.Load(assembly.GetName());
         InvertApplication.CachedAssembly(assembly);
     }
 }