Exemple #1
0
        internal void LoadPlugins(string[] excludedPlugins)
        {
            try
            {
                model = new TModel();

                var libs   = FindLibraries(path);
                var loader = new PluginInfoLoader();
                infos = loader.LoadFrom(typeof(TPlugin).FullName, libs);
                if (infos != null)
                {
                    foreach (var info in infos)
                    {
                        LoadPlugin(info, excludedPlugins);
                    }
                }

                processThread = new Thread(ProcessThreadHandler);
                processThread.IsBackground = true;
                processThread.Start();
            }
            catch (Exception e)
            {
                OnError("load plugins failed", e);
            }
        }
 internal void LoadPlugins(string[] excludedPlugins)
 {
     try
     {
         var libs   = FindLibraries(_path);
         var loader = new PluginInfoLoader();
         _infos = loader.LoadFrom(typeof(TPlugin).FullName, libs);
         if (_infos != null)
         {
             foreach (var info in _infos)
             {
                 LoadPlugin(info, excludedPlugins);
             }
         }
     }
     catch (Exception e)
     {
         OnError("Load plugins failed", e);
     }
 }