Exemple #1
0
        // The BindRoles method however, should use object so anything can be sent here
        // from the constructors, then casted to the RoleInterface.

        private void BindRoles(object source, object destination, decimal amount)
        {
            // Make the RolePlayers act the Roles they are supposed to.
            SourceAccount      = (SourceAccountRole)source;
            DestinationAccount = (DestinationAccountRole)destination;
            Amount             = amount;
        }
Exemple #2
0
 public MoneyTransfer(SourceAccountRole source, DestinationAccountRole destination, decimal amount)
 {
     BindRoles(source, destination, amount);
 }
 public MoneyTransfer(SourceAccountRole source, DestinationAccountRole destination, decimal amount)
 {
     BindRoles(source, destination, amount);
 }