예제 #1
0
 private void Security_TradeCompleted(object sender, TradeCompletedEventArgs e)
 {
     TradeExecuted?.Invoke(this, new TradedPriceEventArgs(e.TradeDetail));
 }
예제 #2
0
 /// <summary>
 /// Helper to execute TradeExecuted event on a separate thread
 /// </summary>
 /// <param name="trade">Trade that was executed</param>
 /// <returns>Task being executed on. This allows the caller to await the call</returns>
 protected Task OnTradeExecuted(Trade trade)
 {
     return(Task.Run(() => TradeExecuted?.Invoke(this, trade)));
 }