Ejemplo n.º 1
0
        private static void BootstrapApp(CLIArguments pargs)
        {
            // log config
            Logging.ConfigGenerator logConfig = new Logging.ConfigGenerator(pargs.Debug, pargs.File);
            LogManager.Configuration = logConfig.GetConfig();
            logger.Debug("Initialized logging config with debug: {d} and file: {f}", pargs.Debug, pargs.File);

            // plugins
            string cwd       = Directory.GetCurrentDirectory();
            string pluginDir = Path.Combine(cwd, "plugins");

            Plugins.DLLLoader loader = new Plugins.DLLLoader();
            // Inject the loader, then use the manager to add in additional/default
            // plugins as necessary
            Plugins.PluginManager       manager = new Plugins.PluginManager(loader);
            ICollection <IExcelProcess> plugins = manager.LoadFromDirectory(pluginDir);

            // main app
            Files.FileFinder   ff      = new Files.FileFinder(new string[] { pargs.Input });
            App.IFileProcessor fp      = new App.BasicFileProcessor();
            App.App            mainApp = new App.ProcessorApp(pargs.Input, pargs.Output, plugins, ff, fp);
            mainApp.Run();
        }
Ejemplo n.º 2
0
 public PluginManager(DLLLoader FileLoader)
 {
     loader = FileLoader;
 }