Exemple #1
0
 public void Subscribe(RtdServerUpdateNotify notify)
 {
     this.notify = notify;
     if (this.IsSubscribedChanged != null)
     {
         IsSubscribedChanged(this, true);
     }
 }
Exemple #2
0
 public void Unsubscribe()
 {
     this.notify = null;
     if (this.IsSubscribedChanged != null)
     {
         IsSubscribedChanged(this, false);
     }
 }
 public void Unsubscribe()
 {
     this.notify = null;
     lock (this.item.cellTickers)
     {
         this.item.cellTickers.Remove(this);
     }
     this.item.cellCount.Value = this.item.cellTickers.Count;
     item.CountSubscriptions();
 }
Exemple #4
0
        public dynamic ConnectData(int TopicID, ref Array Strings, ref bool GetNewValues)
        {
            GetNewValues = true;

            string[] args = new string[Strings.Length];
            for (int k = 0; k < args.Length; k++)
            {
                args[k] = (string)Strings.GetValue(k);
            }

            IRtdServerTicker ticker = null;

            foreach (var router in routers)
            {
                ticker = router.TryGetTicker(args);
                if (ticker != null)
                {
                    break;
                }
            }

            this.tickers[TopicID] = ticker;

            if (ticker == null)
            {
                return(ExcelError.Name);
            }
            else
            {
                RtdServerUpdateNotify notify = new RtdServerUpdateNotify(delegate()
                {
                    lock (this.staleTickers)
                    {
                        this.staleTickers.Add(TopicID);
                    }

                    if (!this.notified)
                    {
                        this.notified = true;
                        this.dispatcher.BeginInvoke(updateNotify, null);
                    }
                });

                ticker.Subscribe(notify);
                return(ticker.Value);
            }
        }
 public void Subscribe(RtdServerUpdateNotify notify)
 {
     this.notify = notify;
 }
 public void Unsubscribe()
 {
     this.notify = null;
     lock(this.item.cellTickers)
     {
         this.item.cellTickers.Remove(this);
     }
     this.item.cellCount.Value = this.item.cellTickers.Count;
     item.CountSubscriptions();
 }
 public void Subscribe(RtdServerUpdateNotify notify)
 {
     this.notify = notify;
 }
Exemple #8
0
        public dynamic ConnectData(int TopicID, ref Array Strings, ref bool GetNewValues)
        {
            GetNewValues = true;

            string[] args = new string[Strings.Length];
            for(int k = 0; k < args.Length; k++)
                args[k] = (string) Strings.GetValue(k);

            IRtdServerTicker ticker = null;
            foreach(var router in routers)
            {
                ticker = router.TryGetTicker(args);
                if(ticker != null)
                    break;
            }

            this.tickers[TopicID] = ticker;

            if(ticker == null)
            {
                return ExcelError.Name;
            }
            else
            {
                RtdServerUpdateNotify notify = new RtdServerUpdateNotify(delegate()
                {
                    lock (this.staleTickers)
                    {
                        this.staleTickers.Add(TopicID);
                    }

                    if(!this.notified)
                    {
                        this.notified = true;
                        this.dispatcher.BeginInvoke(updateNotify, null);
                    }
                });

                ticker.Subscribe(notify);
                return ticker.Value;
            }
        }
Exemple #9
0
 public void Unsubscribe()
 {
     this.notify = null;
     if(this.IsSubscribedChanged != null)
         IsSubscribedChanged(this, false);
 }
Exemple #10
0
 public void Subscribe(RtdServerUpdateNotify notify)
 {
     this.notify = notify;
     if(this.IsSubscribedChanged != null)
         IsSubscribedChanged(this, true);
 }