private void OnTrade(object sender, TradeEventArgs e) { if (procSpread.Started) { for (int i = 0; i < spread.MultiplierSize; i++) { SendSpreadOrder(e.ACTION, true); } } }
//The event-invoking method that derived classes can override. protected virtual void OnTradeEvt(TradeEventArgs e) { // Make a temporary copy of the event to avoid possibility of // a race condition if the last subscriber unsubscribes // immediately after the null check and before the event is raised. EventHandler<TradeEventArgs> handler = TradeEvt; if (handler != null) { handler(this, e); } }
//The event-invoking method that derived classes can override. protected virtual void OnTradeEvt(TradeEventArgs e) { // Make a temporary copy of the event to avoid possibility of // a race condition if the last subscriber unsubscribes // immediately after the null check and before the event is raised. EventHandler <TradeEventArgs> handler = TradeEvt; if (handler != null) { handler(this, e); } }
private void OnTrade(object sender, TradeEventArgs e) { if (procSpread.Started) { for (int i = 0; i<spread.MultiplierSize;i++ ) { SendSpreadOrder(e.ACTION, true); } } }