Exemplo n.º 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;
        }
Exemplo n.º 2
0
 private void BindRoles(object source, object creditors)
 {
     SourceAccount = (SourceAccountRole)source;
     Creditors     = (CreditorsRole)creditors;
 }
Exemplo n.º 3
0
 public PayBills(SourceAccountRole source, CreditorsRole creditors)
 {
     BindRoles(source, creditors);
 }
Exemplo n.º 4
0
 public MoneyTransfer(SourceAccountRole source, DestinationAccountRole destination, decimal amount)
 {
     BindRoles(source, destination, amount);
 }
Exemplo n.º 5
0
 public MoneyTransfer(SourceAccountRole source, DestinationAccountRole destination, decimal amount)
 {
     BindRoles(source, destination, amount);
 }
Exemplo n.º 6
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;
 }