Пример #1
0
        private Command InitiateCommand(AssemblerCommand assemblerCommand)
        {
            var targetCommand = commands[assemblerCommand.Name];

            targetCommand.UpdateCommand(assemblerCommand);
            return(targetCommand);
        }
Пример #2
0
        static AssemblerCommand[] ExtractCommands(string[] inputLines)
        {
            var commands = new AssemblerCommand[inputLines.Length];

            for (int i = 0; i < inputLines.Length; i++)
            {
                commands[i] = new AssemblerCommand(inputLines[i]);
            }

            return(commands);
        }
Пример #3
0
        public void UpdateCommand(AssemblerCommand command)
        {
            if (command.Name != CommandName)
            {
                throw new Exception("WrongCommandExecuted");
            }

            IsDone         = false;
            currentCommand = command;

            executionSteps = null;
            executionSteps = ChoseExecutionSteps();
        }
 public void SetValue(AssemblerCommand command)
 {
     curCommand = command;
 }