예제 #1
0
 //Method that set next handler in the pipeline
 public CurrencyBill RegisterNext(CurrencyBill currencyBill)
 {
     next = currencyBill;
     return(next);
 }
예제 #2
0
 //A static constructor that initializes static Zero property
 //This property is used as default next handler instead of a null object
 static CurrencyBill()//静态构造函数的用法
 {
     Zero = new ZeroCurrencyBill();
 }