Ejemplo n.º 1
0
        void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
        {
            var feed = (DataFeed)sender;

            lock (this.synchronizer)
            {
                this.symbolToInfo.Clear();
                this.symbolToLevel2.Clear();

                foreach (var element in e.Information)
                {
                    this.symbolToInfo[element.Name] = element;
                }
            }

            Action action = this.RefreshSymbols;

            this.Invoke(action);

            var symbols = new List <string>(e.Information.Length);

            foreach (var element in e.Information)
            {
                symbols.Add(element.Name);
            }
            feed.Server.SubscribeToQuotes(symbols, 5);
        }
Ejemplo n.º 2
0
        void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
        {
            _symbols = e.Information.ToList();
            Log.Debug(string.Format("Symbols information is received. Symbols count = {0}", _symbols.Count));

            // to us means also that symbols are already availiable
            IsConnected = true;
        }
Ejemplo n.º 3
0
 void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
 {
     lock (this.SyncRoot)
     {
         this.updateCallback(null, e.Information, null, null);
         this.processor.WakeUp();
     }
 }
Ejemplo n.º 4
0
        void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
        {
            var feed = (DataFeed)sender;

            feed.SymbolInfo -= this.OnSymbolInfo;
            this.eventArgs   = e;
            this.syncEvent.Set();
        }
Ejemplo n.º 5
0
        void RaiseSymbolInfo(FxMessage message)
        {
            var eh = this.SymbolInfo;

            if (eh != null)
            {
                var e = new SymbolInfoEventArgs(message, this.UsedProtocolVersion);
                eh(this, e);
            }
        }
Ejemplo n.º 6
0
        void OnFeedSymbolInfo(object sender, SymbolInfoEventArgs e)
        {
            var symbols = new Dictionary <string, SymbolInfo>(e.Information.Length);

            foreach (var element in e.Information)
            {
                symbols[element.Name] = element;
            }

            lock (this.synchronizer)
            {
                this.Symbols = symbols;
            }
            this.syncEvent.Set();
        }
Ejemplo n.º 7
0
        void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
        {
            if (this.InvokeRequired)
            {
                this.InvokeInPrimaryThread(OnSymbolInfo, sender, e);
                return;
            }

            this.m_symbols.Items.Clear();
            foreach (var element in e.Information)
            {
                this.m_symbols.Items.Add(element.Name);
            }
            if (e.Information.Length > 0)
            {
                this.m_symbols.SelectedIndex = 0;
            }
            this.Log("Symbols information is received");
            this.ApplyConnectedState();
        }
Ejemplo n.º 8
0
        void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
        {
            try
            {
                var symbols = e.Information
                              .Select(o => o.Name)
                              .ToArray();

                this.feed.Server.SubscribeToQuotes(symbols, 1);
            }
            catch (Exception ex)
            {
                var eh = this.Error;
                if (eh != null)
                {
                    var errEventArgs = new ErrorEventArgs(ex);
                    eh(this, errEventArgs);
                }
            }
        }
Ejemplo n.º 9
0
 void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
 {
 }