static Command GetRunCommand(string key, string description, params IStatement[] statements) { IStatement statement = MakeCompoundStatement(statements); MyIStack <IStatement> executionStack = new MyStack <IStatement>(); executionStack.Push(statement); MyIDictionary <string, int> symbolTable = new MyDictionary <string, int>(); MyIList <int> output = new MyList <int>(); ProgramState programState = new ProgramState(executionStack, symbolTable, output); IRepository repository = new MemoryRepository("log.txt"); repository.Add(programState); InterpreterController controller = new InterpreterController(repository); return(new RunExampleCommand(key, description, controller)); }
public List <Employee> GetInterpreterList() { return(InterpreterController.GetInterpreterList()); }
public RunExampleCommand(string key, string description, InterpreterController controller) : base(key, description) { this.controller = controller; }
public RunExample(string key, string description, InterpreterController ctrl) : base(key, description) { this.ctrl = ctrl; }