// Compute new value given operator and operand public void Compute(char @operator, int operand) { // Create command operation and execute it var command = new CalculatorCommand(calculator, @operator, operand); command.Execute(); // Add command to undo list commands.Add(command); current++; }
// Compute new value given operator and operand public void Compute(char @operator, int operand) { // Create command operation and execute it ICommand command = new CalculatorCommand( _calculator, @operator, operand); command.Execute(); // Add command to undo list _commands.Add(command); _current++; }