Beispiel #1
0
 public void EfetuarPagamento(BancoEnum id)
 {
     if (PodeEfetuarPagamento(id))
     {
         EfetuaPagamento();
     }
     else
     {
         if (next == null)
         {
             throw new Exception("banco não cadastrado");
         }
         next.EfetuarPagamento(id);
     }
 }
Beispiel #2
0
 public BancoChain(BancoEnum id)
 {
     next = null;
     identificadorBanco = id;
 }
Beispiel #3
0
 private bool PodeEfetuarPagamento(BancoEnum id)
 {
     return(identificadorBanco == id);
 }