コード例 #1
0
        public object Execute(object system)
        {
            Account  account = null;
            PetStore ps      = (PetStore)system;

            if (!ps.checkCreateAccount(this.login, this.password))
            {
                throw new ArgumentException("Invalid account parameters.");
            }
            account = new Account(this.login, this.password);
            ps.addAccount(account);
            return(account);
        }