コード例 #1
0
ファイル: ReplEngineFactory.cs プロジェクト: gwenzek/icsharp
        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;

        }
コード例 #2
0
ファイル: ReplEngineWrapper.cs プロジェクト: gwenzek/icsharp
 public ReplEngineWrapper(ILog logger, Repl repl, MemoryBufferConsole console)
 {
     this.logger = logger;
     this.repl = repl;
     this.console = console;
 }
コード例 #3
0
 public ReplEngineWrapper(ILog logger, Repl repl, MemoryBufferConsole console)
 {
     this.logger  = logger;
     this.repl    = repl;
     this.console = console;
 }
コード例 #4
0
ファイル: ReplEngineWrapper.cs プロジェクト: liaskast/icsharp
        //private


        public ReplEngineWrapper(ILog logger, ScriptState <object> repl, MemoryBufferConsole console)
        {
            this.logger  = logger;
            this.repl    = repl;
            this.console = console;
        }