コード例 #1
0
ファイル: Command.cs プロジェクト: mengtest/DesignPattern
        public void Compute(char @operator, int operand)
        {
            // Create command operation and execute it
            Command command = new CalculatorCommand(
                calculator, @operator, operand);

            command.Execute();
            // Add command to undo list
            commands.Add(command);
            current++;
        }
コード例 #2
0
ファイル: Command.cs プロジェクト: AndyMolly/DesignPattern
 public void Compute(char @operator, int operand)
 {
     // Create command operation and execute it
     Command command = new CalculatorCommand(
     calculator, @operator, operand);
     command.Execute();
     // Add command to undo list
     commands.Add(command);
     current++;
 }