Example #1
0
        public IScriptServicesBuilder LoadModules(string extension, params string[] moduleNames)
        {
            var config = new ModuleConfiguration(_debug, _scriptName, _repl, _logLevel, Overrides);
            var loader = _initializationServices.GetModuleLoader();

            loader.Load(config, _initializationServices.GetFileSystem().ModulesFolder, extension, moduleNames);
            return(this);
        }
        public IScriptServicesBuilder LoadModules(string extension, params string[] moduleNames)
        {
            var config = new ModuleConfiguration(_cache, _scriptName, _repl, _logLevel, Overrides);
            var loader = _initializationServices.GetModuleLoader();

            var fs      = _initializationServices.GetFileSystem();
            var folders = _debug ? new[] { fs.ModulesFolder, fs.CurrentDirectory } : new[] { fs.ModulesFolder };

            loader.Load(config, folders, extension, moduleNames);
            return(this);
        }