public ClearCommand(IJishInterpreter jish, JSConsole console) { Trace.Assert(jish != null); Trace.Assert(console != null); this.jish = jish; this.console = console; }
public ClearCommand(IJishInterpreter jish, JSConsole console) { Trace.Assert(jish != null); Trace.Assert(console != null); this.jish = jish; this.console = console; }
public JishHost(VSConsole jsConsole, IJishInterpreter jish) { this.jsConsole = jsConsole; this.jish = jish; solutionManager = ((IComponentModel) Package.GetGlobalService(typeof (SComponentModel))).GetService<ISolutionManager>(); IsCommandEnabled = true; }
public JishHost(VSConsole jsConsole, IJishInterpreter jish) { this.jsConsole = jsConsole; this.jish = jish; solutionManager = ((IComponentModel)Package.GetGlobalService(typeof(SComponentModel))).GetService <ISolutionManager>(); IsCommandEnabled = true; }
private void StartInputLoop(IJishInterpreter interpreter) { Console.WriteLine("Welcome to Jish. Type '.help' for more options."); while (true) { string command = interpreter.ReadCommand(); interpreter.ExecuteCommand(command); } }
private void StartInputLoop(IJishInterpreter interpreter) { Console.WriteLine("Welcome to Jish. Type '.help' for more options."); while (true) { string command = interpreter.ReadCommand(); interpreter.ExecuteCommand(command); } }
public MainRunner(string[] args) { IJishInterpreter interpreter = DefaultJishInterpreterFactory.CreateInterpreter(new JSConsole()); if (args == null || args.Length == 0) { StartInputLoop(interpreter); } else { ExecuteArgs(args, interpreter); } }
private void ExecuteArgs(string[] args, IJishInterpreter interpreter) { Trace.Assert(args != null); Trace.Assert(args.Any()); string file = args[0]; if (!File.Exists(file)) { Console.WriteLine("Could not find " + file); return; } interpreter.RunFile(file, args.Skip(1).ToArray()); }
private void ExecuteArgs(string[] args, IJishInterpreter interpreter) { Trace.Assert(args != null); Trace.Assert(args.Any()); string file = args[0]; if (!File.Exists(file)) { Console.WriteLine("Could not find " + file); return; } interpreter.RunFile(file, args.Skip(1).ToArray()); }
public virtual void SetUp() { StandardKernel kernel = new StandardKernel(); IEngine engine = new JSNetEngine(); kernel.Bind<IEngine>().ToConstant(engine); kernel.Bind<ICurrentContextAssemblies>().To<TestCurrentContextAssemblies>(); console = new TestingConsole(); LoadedAssembliesBucket bucket = new LoadedAssembliesBucket(kernel.Get<HelpMgr>(), kernel, console); kernel.Bind<LoadedAssembliesBucket>().ToConstant(bucket); engine.SetGlobal("console", console); kernel.Bind<JSConsole>().ToConstant(console); kernel.Bind<IJishInterpreter>().To<JishInterpreter>().InSingletonScope(); jish = kernel.Get<IJishInterpreter>(); ((JishInterpreter) jish).ThrowErrors = true; }
[SetUp] public virtual void SetUp() { StandardKernel kernel = new StandardKernel(); IEngine engine = new JSNetEngine(); kernel.Bind <IEngine>().ToConstant(engine); kernel.Bind <ICurrentContextAssemblies>().To <TestCurrentContextAssemblies>(); console = new TestingConsole(); LoadedAssembliesBucket bucket = new LoadedAssembliesBucket(kernel.Get <HelpMgr>(), kernel, console); kernel.Bind <LoadedAssembliesBucket>().ToConstant(bucket); engine.SetGlobal("console", console); kernel.Bind <JSConsole>().ToConstant(console); kernel.Bind <IJishInterpreter>().To <JishInterpreter>().InSingletonScope(); jish = kernel.Get <IJishInterpreter>(); ((JishInterpreter)jish).ThrowErrors = true; }
public BreakCommand(IJishInterpreter jish) { Trace.Assert(jish != null); this.jish = jish; }
public BreakCommand(IJishInterpreter jish) { Trace.Assert(jish != null); this.jish = jish; }