예제 #1
0
        private void HandleOrderStatus(object sender, OrderStatusEventArgs args)
        {
            var orderId = args.OrderId;

            Log.Debug("Order status: {0}, permid: {1}, orderid: {2}", args.Status, args.PermId, orderId);
            if (_orders.ContainsKey(orderId))
            {
                var symbol = _orders[orderId];
                _queueProcessor.Enqueue(() => Messenger.Default.Send(new OrderStatusChangedMessage(symbol, args), OrderStatusChangedMessage.Tokens.Orders));
            }
        }
예제 #2
0
 private void HandleOrderStatusEvent(object sender, OrderStatusEventArgs args)
 {
     // Hand off processing to the queue processor to improve perf of the API processing loop
     _queueProcessor.Enqueue(() => HandleOrderStatus(args));
 }