public bool Run(ICommandInteraction writer, PathToken path) { if(!File.Exists(path.Value)) { writer.WriteError(String.Format("No such file {0}.", path.Value)); return false; } using(var progress = EmulationManager.Instance.ProgressMonitor.Start("Including script: " + path.Value)) { bool result = false; switch(Path.GetExtension(path.Value)) { case ".py": result = PythonExecutor(path.Value, writer); break; case ".cs": result = CsharpExecutor(path.Value, writer); break; default: result = ScriptExecutor(path.Value); break; } return result; } }
public void Run(ICommandInteraction writer, PathToken path) { if(IncludeCommand.Run(writer, path)) { EmulationManager.Instance.CurrentEmulation.StartAll(); } }
public void Run(PathToken path) { Logger.AddBackend(new FileBackend(path.Value), "file", true); }