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