Ejemplo n.º 1
0
 public static void RegistAtStart()
 {
     if (!PluginsManagement.registed)
     {
         PluginsManagement.registed = true;
         string        mapPath = IOHelper.GetMapPath("/plugins");
         List <string> list    = PluginsManagement.GetPluginFiles(mapPath).ToList();
         list.AddRange(PluginsManagement.GetPluginFiles(IOHelper.GetMapPath("/Strategies")));
         foreach (string str in list)
         {
             PluginsManagement.InstallDll(str);
         }
     }
 }
Ejemplo n.º 2
0
 public static void InstallPlugin(string pluginFullDirectory)
 {
     foreach (string pluginFile in PluginsManagement.GetPluginFiles(pluginFullDirectory))
     {
         try
         {
             PluginsManagement.InstallDll(pluginFile);
         }
         catch (Exception exception)
         {
             Log.Error(string.Concat("插件安装失败(", pluginFile, ")"), exception);
         }
     }
 }