public override void Call()
            {
                BankAccountCommand last = null;

                foreach (var cmd in this)
                {
                    if (last == null || last.Succeeded)
                    {
                        cmd.Call();
                        last = cmd;
                    }
                    else
                    {
                        cmd.Undo();
                        break;
                    }
                }
            }
            public void Test1()
            {
                var ba = new BankAccount();

                var deposit = new BankAccountCommand(ba,
                                                     BankAccountCommand.Action.Deposit, 100);

                var withdraw = new BankAccountCommand(ba,
                                                      BankAccountCommand.Action.Withdraw, 50);

                var composite = new CompositeBankAccountCommand(
                    new[] { withdraw, deposit });

                composite.Call();

                Debug.WriteLine(ba);

                composite.Undo();
                Debug.WriteLine(ba);
            }