Exemple #1
0
 void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
 {
     lock (this.SyncRoot)
     {
         this.updateCallback(e.Information, null, null);
         this.processor.WakeUp();
     }
 }
Exemple #2
0
        private void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
        {
            _symbols = e.Information.ToList();
            Log.Debug("Symbols information is received. Symbols count = {0}", _symbols.Count);

            // to us means also that symbols are already availiable
            IsConnected = true;
        }
Exemple #3
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);
                }
            }
        }
Exemple #4
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);
        }
Exemple #5
0
 void RaiseSymbolInfo(FxMessage message)
 {
     var eh = this.SymbolInfo;
     if (eh != null)
     {
         var e = new SymbolInfoEventArgs(message, this.UsedProtocolVersion);
         eh(this, e);
     }
 }
Exemple #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();
        }
Exemple #7
0
 void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
 {
 }
Exemple #8
0
 void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
 {
     var feed = (DataFeed)sender;
     feed.SymbolInfo -= this.OnSymbolInfo;
     this.eventArgs = e;
     this.syncEvent.Set();
 }