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