コード例 #1
0
ファイル: StockTicker.cs プロジェクト: sarprk/DesignPatterns
 protected virtual void OnStockChange(StockChangeEventArgs e)
 {
     if (StockChange != null)
     {
         StockChange(this, e);
     }
 }
コード例 #2
0
 protected virtual void OnStockChange(StockChangeEventArgs e)
 {
     // This rule checks if there are any observers
     // that are associate with the stock change event
     if (StockChange != null)
     {
         // This rule would call each of the Observers
         // With the subject and the event arguments
         StockChange(this, e);
     }
 }
コード例 #3
0
 void st_StockChange(object sender, StockChangeEventArgs e)
 {
     CheckFilter(e.Stock);
 }