private void ProcessSecurityMarketData(Security security, MarketDataTypes dataType, Security subscriber) { var message = new MarketDataMessage { DataType = dataType, IsSubscribe = true, //SecurityId = _connector.GetSecurityId(subscriber), TransactionId = _connector.TransactionIdGenerator.GetNextId() }; switch (dataType) { case MarketDataTypes.Trades: message.Arg = ExecutionTypes.Tick; break; case MarketDataTypes.OrderLog: message.Arg = ExecutionTypes.OrderLog; break; } message.FillSecurityInfo(_connector, subscriber); if (security == null) { message.Error = new ArgumentException(LocalizedStrings.Str692Params.Put(message.SecurityId, _connector.Name)); _connector.SendOutMessage(message); } else { _connector.SendInMessage(message); } }
private void ProcessSecurityMarketData(Security security, MarketDataMessage message /*, Security subscriber*/) { //var message = new MarketDataMessage //{ // DataType = dataType, // IsSubscribe = true, // //SecurityId = _connector.GetSecurityId(subscriber), // TransactionId = _connector.TransactionIdGenerator.GetNextId() //}; //switch (dataType) //{ // case MarketDataTypes.Trades: // message.Arg = ExecutionTypes.Tick; // break; // case MarketDataTypes.OrderLog: // message.Arg = ExecutionTypes.OrderLog; // break; //} //message.FillSecurityInfo(_connector, subscriber); if (security == null) { var reply = new MarketDataMessage { OriginalTransactionId = message.TransactionId, Error = new ArgumentException(LocalizedStrings.Str692Params.Put(message.SecurityId, _connector.Name)) }; _connector.SendOutMessage(reply); } else { _connector.SendInMessage(message); } }