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