public void processa(IList<Boleto> boletos, Fatura fatura) { foreach (Boleto boleto in boletos) { Pagamento pagamento = new Pagamento(boleto.Valor, MeioDePagamento.BOLETO); fatura.Pagamentos.Add(pagamento); } }
public override bool Equals(Object obj) { if (!(obj is Pagamento)) { return(false); } Pagamento outro = (Pagamento)obj; if (Forma != outro.Forma || Valor != outro.Valor) { return(false); } return(true); }