Exemplo n.º 1
0
 public override void LoanHandler(object sender, LoanEventArgs e)
 {
     if (e.Loan.Amount < 25000)
     {
         WriteLine($"{this.GetType().Name} approved request# {e.Loan.Number}");
     }
     else if (Successor != null)
     {
         Successor.LoanHandler(this, e);
     }
 }
Exemplo n.º 2
0
 public override void LoanHandler(object sender, LoanEventArgs e)
 {
     if (e.Loan.Amount < 100000)
     {
         WriteLine($"{sender.GetType().Name} approved request# {e.Loan.Number}");
     }
     else if (Successor != null)
     {
         Successor.LoanHandler(this, e);
     }
     else
     {
         WriteLine($"Request# {e.Loan.Number} requires an executive meeting");
     }
 }
Exemplo n.º 3
0
 public virtual void OnLoan(LoanEventArgs e)
 {
     Loan?.Invoke(this, e);
 }
Exemplo n.º 4
0
 //Loan event handler
 public abstract void LoanHandler(object sender, LoanEventArgs e);