예제 #1
0
 public static void LoadPlugins(PluginOptions opt)
 {
     try
     {
         bool flag = CopyFiles(opt.PluginPath);
         //string pluginPath = GetPluginPath();
         //LoadAssembly(pluginPath, QksConsts.Plugin.Core);
         //LoadAssembly(pluginPath, QksConsts.Plugin.Application);
         //LoadAssembly(pluginPath, QksConsts.Plugin.EFCore);
         opt.Loaded  = flag;
         opt.LoadMsg = flag ? "插件加载成功" : "没有找到任何插件";
     }
     catch (Exception e)
     {
         opt.LoadMsg = e.ToString();
     }
 }
예제 #2
0
 public PluginAppService(IApplicationLifetime applicationLifetime, CmdExecutor cmdExecutor, PluginOptions pluginOptions)
 {
     _app       = applicationLifetime;
     _cmd       = cmdExecutor;
     _pluginOpt = pluginOptions;
 }