Exemplo n.º 1
0
 void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
 {
     lock (this.SyncRoot)
     {
         this.updateCallback(e.Information, null, null);
         this.processor.WakeUp();
     }
 }
Exemplo n.º 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;
        }
Exemplo n.º 3
0
Arquivo: Manager.cs Projeto: ifzz/FDK
        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);
                }
            }
        }
Exemplo n.º 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);
        }
Exemplo n.º 5
0
Arquivo: DataFeed.cs Projeto: ifzz/FDK
 void RaiseSymbolInfo(FxMessage message)
 {
     var eh = this.SymbolInfo;
     if (eh != null)
     {
         var e = new SymbolInfoEventArgs(message, this.UsedProtocolVersion);
         eh(this, e);
     }
 }
Exemplo n.º 6
0
Arquivo: Snapshot.cs Projeto: ifzz/FDK
        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();
        }
Exemplo n.º 7
0
Arquivo: Example.cs Projeto: ifzz/FDK
 void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
 {
 }
Exemplo n.º 8
0
 void OnSymbolInfo(object sender, SymbolInfoEventArgs e)
 {
     var feed = (DataFeed)sender;
     feed.SymbolInfo -= this.OnSymbolInfo;
     this.eventArgs = e;
     this.syncEvent.Set();
 }