Exemple #1
0
 private void SetOutputs(RShipCore core)
 {
     core.StdOut.Writer = new StandardOutputWriter();
     var console = core.Console;
     console.ConsoleReader = new StandardInputReader();
     console.CoreStream.Pipe(new StandardOutputStream(ConsoleColor.Cyan));
     console.LogStream.Pipe(new StandardOutputStream(ConsoleColor.White));
     console.ErrStream.Pipe(new StandardErrorStream(ConsoleColor.Red));
 }
Exemple #2
0
 private RShipCore CreateCore(IScriptEngine engine)
 {
     var modulesPath = Path.Combine(PathHelpers.GetAssemblyDirectory(), "ship_modules");
     var pathResolver = new ModulePathResolver(modulesPath, new[] { ".ship", ".js", ".json", ".dll" }, "lib");
     var loaderFactory = new ModuleLoaderFactory();
     var core = new RShipCore(engine, pathResolver, loaderFactory);
     return core;
 }