Esempio n. 1
0
        private void ProcessMessage(SecurityId adapterId, Message message)
        {
            adapterId.SetNativeId(null);

            if (!adapterId.IsDefault())
            {
                var stockSharpId = Storage.TryGetStockSharpId(StorageName, adapterId);

                if (stockSharpId != null)
                {
                    message.ReplaceSecurityId(stockSharpId.Value);
                }
            }

            base.OnInnerAdapterNewOutMessage(message);
        }
Esempio n. 2
0
        private void ProcessMessage(SecurityId adapterId, Message message)
        {
            adapterId.SetNativeId(null);

            if (!adapterId.IsDefault())
            {
                SecurityId?stockSharpId;

                lock (_syncRoot)
                    stockSharpId = _securityIds.TryGetKey2(adapterId);

                if (stockSharpId != null)
                {
                    message.ReplaceSecurityId(stockSharpId.Value);
                }
            }

            base.OnInnerAdapterNewOutMessage(message);
        }