private Repl GetRepl(string[] args, out MemoryBufferConsole memoryBufferConsole) { SetProfile(); ScriptCsArgs arguments = ParseArguments(args); var scriptServicesBuilder = ScriptServicesBuilderFactory.Create(Config.Create(arguments), args); IInitializationServices _initializationServices = scriptServicesBuilder.InitializationServices; IFileSystem _fileSystem = _initializationServices.GetFileSystem(); if (_fileSystem.PackagesFile == null) { throw new ArgumentException("The file system provided by the initialization services provided by the script services builder has a null packages file."); } if (_fileSystem.PackagesFolder == null) { throw new ArgumentException("The file system provided by the initialization services provided by the script services builder has a null package folder."); } ScriptServices scriptServices = scriptServicesBuilder.Build(); memoryBufferConsole = new MemoryBufferConsole(); Repl repl = new Repl( args, _fileSystem, scriptServices.Engine, scriptServices.ObjectSerializer, scriptServices.LogProvider, scriptServices.ScriptLibraryComposer, memoryBufferConsole, scriptServices.FilePreProcessor, scriptServices.ReplCommands); var workingDirectory = _fileSystem.CurrentDirectory; var assemblies = scriptServices.AssemblyResolver.GetAssemblyPaths(workingDirectory); var scriptPacks = scriptServices.ScriptPackResolver.GetPacks(); repl.Initialize(assemblies, scriptPacks, null); return repl; }
public ReplEngineWrapper(ILog logger, Repl repl, MemoryBufferConsole console) { this.logger = logger; this.repl = repl; this.console = console; }
//private public ReplEngineWrapper(ILog logger, ScriptState <object> repl, MemoryBufferConsole console) { this.logger = logger; this.repl = repl; this.console = console; }