コード例 #1
0
 public void Subscribe(RtdServerUpdateNotify notify)
 {
     this.notify = notify;
     if (this.IsSubscribedChanged != null)
     {
         IsSubscribedChanged(this, true);
     }
 }
コード例 #2
0
 public void Unsubscribe()
 {
     this.notify = null;
     if (this.IsSubscribedChanged != null)
     {
         IsSubscribedChanged(this, false);
     }
 }
コード例 #3
0
 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();
 }
コード例 #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);
            }
        }
コード例 #5
0
 public void Subscribe(RtdServerUpdateNotify notify)
 {
     this.notify = notify;
 }
コード例 #6
0
 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();
 }
コード例 #7
0
 public void Subscribe(RtdServerUpdateNotify notify)
 {
     this.notify = notify;
 }
コード例 #8
0
ファイル: RtdServer.cs プロジェクト: ZoomerAnalytics/dde_rtd
        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;
            }
        }
コード例 #9
0
ファイル: RtdServer.cs プロジェクト: ZoomerAnalytics/dde_rtd
 public void Unsubscribe()
 {
     this.notify = null;
     if(this.IsSubscribedChanged != null)
         IsSubscribedChanged(this, false);
 }
コード例 #10
0
ファイル: RtdServer.cs プロジェクト: ZoomerAnalytics/dde_rtd
 public void Subscribe(RtdServerUpdateNotify notify)
 {
     this.notify = notify;
     if(this.IsSubscribedChanged != null)
         IsSubscribedChanged(this, true);
 }