示例#1
0
            private void OnConnectorNewMessage(Message message)
            {
                switch (message.Type)
                {
                case MessageTypes.SecurityLookupResult:
                {
                    var id = ((SecurityLookupResultMessage)message).OriginalTransactionId;

                    var tuple = _lookupMessages.TryGetValue(id);

                    if (tuple != null)
                    {
                        var security = _connector.FilterSecurities(tuple.Item1).FirstOrDefault();

                        ProcessSecurityMarketData(security, tuple.Item3, tuple.Item2);

                        _lookupMessages.Remove(id);
                    }

                    break;
                }

                    //TODO убрать подписку на MarketDataSubscriptionSucceeded
                    //case MessageTypes.MarketData:
                    //{
                    //	if (direction == MessageDirections.ToMarketData)
                    //		break;

                    //	break;
                    //}
                }
            }