public override void LoanHandler(object sender, LoanEventArgs eventArgs) { if (eventArgs.Loan.Amount < 100000) { Console.WriteLine("{0} approved request# {1}", this.GetType().Name, eventArgs.Loan.Number); } else if (Successor != null) { Successor.LoanHandler(this, eventArgs); } }
public virtual void OnLoan(LoanEventArgs loanEventArgs) { LoanEvent?.Invoke(this, loanEventArgs); }
public abstract void LoanHandler(object sender, LoanEventArgs eventArgs);